Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1txIRp-006DFR-Hf for pgsql-general@arkaria.postgresql.org; Wed, 26 Mar 2025 04:33:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1txIRo-00Ed84-8f for pgsql-general@arkaria.postgresql.org; Wed, 26 Mar 2025 04:33:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1txIRn-00Ed7v-UF for pgsql-general@lists.postgresql.org; Wed, 26 Mar 2025 04:32:59 +0000 Received: from smtp101.iad3a.emailsrvr.com ([173.203.187.101]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1txIRm-001AbL-1a for pgsql-general@postgresql.org; Wed, 26 Mar 2025 04:32:59 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp29.relay.iad3a.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 0CAD724DD0; Wed, 26 Mar 2025 00:32:56 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: Replication slot WAL reservation From: Christophe Pettus In-Reply-To: Date: Tue, 25 Mar 2025 21:32:26 -0700 Cc: pgsql-general@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <3CBAE3E1-4ECB-4936-908E-3F03B79886F8@thebuild.com> References: <270FB587-2E83-4EB0-9FD6-07541F2A6A17@thebuild.com> To: Phillip Diffley X-Mailer: Apple Mail (2.3776.700.51.11.1) X-Classification-ID: 107b5a29-0c88-4661-86cf-17530af5916e-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mar 25, 2025, at 20:56, Phillip Diffley = wrote: >=20 > 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-STATUS-UPDATE 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.=20 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.=