Closed jmealo closed 3 years ago
How did you go with this?
Not yet looked deeper at. Isn't it the case that these streaming replication commands are sent to the server using PQexec() and return the result as an ordinary PGresult * ?
After looking into the protocol and how data is transferred, I think there is already everything in place to use the streaming protocol. One you setup streaming, the server will return data as COPY data, and that can be handled in luapgsql using getCopyData(). I never tried luapgsql in this way, but I think it should be possible right out of the box.
I am closing this issue as will not have time in the foreseeable future to work on this.
Hello,
I'd like to port Lapidus over to Lua and stop wrapping
pg_recvlogical
by connecting to PostgreSQL directly using the Streaming Replication Protocol.I'm going to see if I can figure this out as the code is very readable. I only muck around in other people's C code, I don't write much of it from scratch, so should you choose to review/accept it be brutal on my PR (I could use the feedback).
Please let me know if you're interested or have any pointers.
Kudos on
luapgsql
. I look forward to using it!