Re: protocol-level wait-for-LSN

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: peter(at)eisentraut(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: protocol-level wait-for-LSN
Date: 2024-10-29 05:06:00
Message-ID: 20241029.140600.1382327295267983604.ishii@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> The patch adds a protocol extension called _pq_.wait_for_lsn as well
> as a libpq connection option wait_for_lsn to activate the same. (Use
> e.g., psql -d 'wait_for_lsn=1'.)
>
> With this protocol extension, two things are changed:
>
> - The ReadyForQuery message sends back the current LSN.

If other protocol extension X tries to add something to the
ReadyForQuery message too, what would happen?
Currently ReadyForQuery message is like this:

Byte1('Z')
Int32
Byte1

With the wait_for_lsn extension, It becomes:

Byte1('Z')
Int32
Byte1
String

Suppose the X extension wants to extend like this:

Byte1('Z')
Int32
Byte1
Int32

It seems impossible to coexist both.

Does this mean once the wait_for_lsn extension is brought into the
frontend/backend protocol specification, no other extensions that touch
ReadyForQuery cannot be defined?

Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yasir 2024-10-29 05:32:02 Re: Alias of VALUES RTE in explain plan
Previous Message Andrei Lepikhov 2024-10-29 04:43:26 Re: Why don't we consider explicit Incremental Sort?