Re: protocol-level wait-for-LSN
От | Jelte Fennema-Nio |
---|---|
Тема | Re: protocol-level wait-for-LSN |
Дата | |
Msg-id | CAGECzQR-W30u9uSkpYqMPRch1pGc4izzHxfHBhGEmbGEBXEwsQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: protocol-level wait-for-LSN (Ants Aasma <ants.aasma@cybertec.at>) |
Ответы |
Re: protocol-level wait-for-LSN
Re: protocol-level wait-for-LSN |
Список | pgsql-hackers |
On Wed, 30 Oct 2024 at 18:18, Ants Aasma <ants.aasma@cybertec.at> wrote: > The idea is great, I have been wanting something like this for a long > time. For future proofing it might be a good idea to not require the > communicated-waited value to be a LSN. Yours and Matthias' feedback make total sense I think. From an implementation perspective I think there are a few things necessary to enable these wider usecases: 1. The token should be considered opaque for clients (should be documented) 2. The token should be defined as variable length in the protocol 3. We should have a hook to allow postgres extensions to override the default token generation 4. We should have a hook to allow postgres extensions to override waiting until the token "timestamp" > Even without sharding LSN might not be a final choice. Right now on > the primary the visibility order is not LSN order. So if a connection > does synchronous_commit = off commit, the write location is not even > going to see the commit. By publishing the end of the commit record it > would be better. But I assume at some point we would like to have a > consistent visibility order, which quite likely means using something > other than LSN as the logical clock. I was going to say that the default could probably still be LSN, but this makes me doubt that. Is there some other token that we can send now that we could "wait" on instead of the LSN, which would work for. If not, I think LSN is still probably a good choice as the default. Or maybe only as a default in case synchronous_commit != off.
В списке pgsql-hackers по дате отправления: