public inbox for [email protected]  
help / color / mirror / Atom feed
From: Christophe Pettus <[email protected]>
To: Phillip Diffley <[email protected]>
Cc: [email protected]
Subject: Re: Replication slot WAL reservation
Date: Tue, 25 Mar 2025 21:32:26 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGAwPgQ1MgX2s4UgEspCwfKN_3okudzwh7NzpkoJZSA1HnGqYQ@mail.gmail.com>
References: <CAGAwPgR=B9VTDwKkHZRHjYTmQzvJ+30mK-uyc7MMw6Tf9s9Fsw@mail.gmail.com>
	<[email protected]>
	<CAGAwPgT2zsO5XYH1_uZuVyOxf7vUUBvPGjXwwBW1ySXicFNQ=Q@mail.gmail.com>
	<[email protected]>
	<CAGAwPgQ1MgX2s4UgEspCwfKN_3okudzwh7NzpkoJZSA1HnGqYQ@mail.gmail.com>



> On Mar 25, 2025, at 20:56, Phillip Diffley <[email protected]> wrote:
> 
> Is there a message type that is used to confirm what logs have been successfully consumed?

You're looking for Standby Status Update:

	https://www.postgresql.org/docs/current/protocol-replication.html#PROTOCOL-REPLICATION-STANDBY-STATU...

The logical replication protocol is a superset of the binary replication protocol, so many of the same messages are used.

> The part I am uncertain about is what "after" means here, since LSNs are not presented in order, and the order of data streamed over the replication slot does not match the order of the data in the WAL. 

I think there's a misunderstanding here (possibly my fault).  Transactions are always presented to the output plugin in commit order, and LSNs can be reliably used to determine the time ordering of commits.  LSNs are exactly what is used to determine how far into the WAL the replication slot has gotten.





view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Replication slot WAL reservation
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox