Re: protocol-level wait-for-LSN
Re: protocol-level wait-for-LSN
От:
Jelte Fennema-Nio <postgres@jeltef.nl>
Дата:
On Mon, 28 Oct 2024 at 16:51, Peter Eisentraut wrote: > Thoughts? + snprintf(xloc, sizeof(xloc), "%X/%X", LSN_FORMAT_ARGS(logptr)) + pq_sendstring(&buf, xloc); nit: I feel that sending the LSN as a string seems unnecessarily wasteful of bytes. I'd rather send it as its binary representation.
Re: protocol-level wait-for-LSN
От:
Peter Eisentraut <peter@eisentraut.org>
Дата:
On 30.10.24 10:03, Jelte Fennema-Nio wrote: > On Mon, 28 Oct 2024 at 16:51, Peter Eisentraut wrote: >> Thoughts? > > + snprintf(xloc, sizeof(xloc), "%X/%X", > LSN_FORMAT_ARGS(logptr)) > + pq_sendstring(&buf, xloc); > > nit: I feel that sending the LSN as a string seems unnecessarily > wasteful of bytes. I'd rather send it as its binary representation. My thinking here was: This protocol is also used by things that are not PostgreSQL. They might have other representations for "position to wait for". I don't know, but it's something to think about.