agora inbox for [email protected]  
help / color / mirror / Atom feed
Re: superusers are members of all roles?
974+ messages / 5 participants
[nested] [flat]

* Re: superusers are members of all roles?
@ 2011-09-10 03:34 Bruce Momjian <[email protected]>
  2011-09-12 01:40 ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
  0 siblings, 1 reply; 974+ messages in thread

From: Bruce Momjian @ 2011-09-10 03:34 UTC (permalink / raw)
  To: Robert Haas <[email protected]>; +Cc: Andrew Dunstan <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers

Robert Haas wrote:
> On Sat, May 7, 2011 at 11:42 PM, Bruce Momjian <[email protected]> wrote:
> > Is this a TODO?
> 
> I think so.

Added to TODO:

	Address problem where superusers are assumed to be members of all groups
	
	    http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php 

-- 
  Bruce Momjian  <[email protected]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* Re: superusers are members of all roles?
  2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
@ 2011-09-12 01:40 ` Andrew Dunstan <[email protected]>
  2011-09-12 02:32   ` Re: superusers are members of all roles? Stephen Frost <[email protected]>
  2011-11-02 19:27   ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
  0 siblings, 2 replies; 974+ messages in thread

From: Andrew Dunstan @ 2011-09-12 01:40 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Robert Haas <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers



On 09/09/2011 11:34 PM, Bruce Momjian wrote:
> Robert Haas wrote:
>> On Sat, May 7, 2011 at 11:42 PM, Bruce Momjian<[email protected]>  wrote:
>>> Is this a TODO?
>> I think so.
> Added to TODO:
>
> 	Address problem where superusers are assumed to be members of all groups
> 	
> 	    http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php

This turns out to be a one-liner.

Patch attached.

cheers

andrew


Attachments:

  [text/x-patch] nosuperhbagroup.patch (700B, ../../[email protected]/2-nosuperhbagroup.patch)
  download | inline diff:
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 1ee030f..1c84a60 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -442,8 +442,13 @@ is_member(Oid userid, const char *role)
 	if (!OidIsValid(roleid))
 		return false;			/* if target role not exist, say "no" */
 
-	/* See if user is directly or indirectly a member of role */
-	return is_member_of_role(userid, roleid);
+	/* 
+	 * See if user is directly or indirectly a member of role.
+	 * For this purpose, a superuser is not considered to be automatically
+	 * a member of the role, so group auth only applies to explicit
+	 * membership.
+	 */
+	return is_member_of_role_nosuper(userid, roleid);
 }
 
 /*


^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* Re: superusers are members of all roles?
  2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
  2011-09-12 01:40 ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
@ 2011-09-12 02:32   ` Stephen Frost <[email protected]>
  2011-09-12 03:27     ` Re: superusers are members of all roles? Robert Haas <[email protected]>
  2011-09-12 03:29     ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
  1 sibling, 2 replies; 974+ messages in thread

From: Stephen Frost @ 2011-09-12 02:32 UTC (permalink / raw)
  To: Andrew Dunstan <[email protected]>; +Cc: Bruce Momjian <[email protected]>; Robert Haas <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers

* Andrew Dunstan ([email protected]) wrote:
> >	Address problem where superusers are assumed to be members of all groups
> >	
> >	    http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php
> 
> This turns out to be a one-liner.

I really don't know that I agree with removing this, to be honest..  I
haven't got time at the moment to really discuss it, but at the very
least, not being able to 'set role' to any user when postgres would be
REALLY annoying..

	Thanks,

		Stephen


Attachments:

  [application/pgp-signature] signature.asc (198B, ../../[email protected]/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* Re: superusers are members of all roles?
  2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
  2011-09-12 01:40 ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
  2011-09-12 02:32   ` Re: superusers are members of all roles? Stephen Frost <[email protected]>
@ 2011-09-12 03:27     ` Robert Haas <[email protected]>
  1 sibling, 0 replies; 974+ messages in thread

From: Robert Haas @ 2011-09-12 03:27 UTC (permalink / raw)
  To: Stephen Frost <[email protected]>; +Cc: Andrew Dunstan <[email protected]>; Bruce Momjian <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers

On Sun, Sep 11, 2011 at 10:32 PM, Stephen Frost <[email protected]> wrote:
> * Andrew Dunstan ([email protected]) wrote:
>> >     Address problem where superusers are assumed to be members of all groups
>> >
>> >         http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php
>>
>> This turns out to be a one-liner.
>
> I really don't know that I agree with removing this, to be honest..  I
> haven't got time at the moment to really discuss it, but at the very
> least, not being able to 'set role' to any user when postgres would be
> REALLY annoying..

Sure.  But I don't believe anyone has proposed changing that.  What
we're talking about here is that, for example, setting a reject rule
for a certain group in pg_hba.conf will always match superusers, even
though they're not in that group.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* Re: superusers are members of all roles?
  2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
  2011-09-12 01:40 ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
  2011-09-12 02:32   ` Re: superusers are members of all roles? Stephen Frost <[email protected]>
@ 2011-09-12 03:29     ` Andrew Dunstan <[email protected]>
  2011-09-12 09:55       ` Re: superusers are members of all roles? Stephen Frost <[email protected]>
  1 sibling, 1 reply; 974+ messages in thread

From: Andrew Dunstan @ 2011-09-12 03:29 UTC (permalink / raw)
  To: Stephen Frost <[email protected]>; +Cc: Bruce Momjian <[email protected]>; Robert Haas <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers



On 09/11/2011 10:32 PM, Stephen Frost wrote:
> * Andrew Dunstan ([email protected]) wrote:
>>> 	Address problem where superusers are assumed to be members of all groups
>>> 	
>>> 	    http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php
>> This turns out to be a one-liner.
> I really don't know that I agree with removing this, to be honest..  I
> haven't got time at the moment to really discuss it, but at the very
> least, not being able to 'set role' to any user when postgres would be
> REALLY annoying..
>
> 	

It's NOT changing that. All this affects is how +groupname is treated in 
pg_hba.conf, i.e. do we treat every superuser there as being a member of 
every group.

cheers

andrew



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* Re: superusers are members of all roles?
  2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
  2011-09-12 01:40 ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
  2011-09-12 02:32   ` Re: superusers are members of all roles? Stephen Frost <[email protected]>
  2011-09-12 03:29     ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
@ 2011-09-12 09:55       ` Stephen Frost <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Stephen Frost @ 2011-09-12 09:55 UTC (permalink / raw)
  To: Andrew Dunstan <[email protected]>; +Cc: Bruce Momjian <[email protected]>; Robert Haas <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers

* Andrew Dunstan ([email protected]) wrote:
> It's NOT changing that. All this affects is how +groupname is
> treated in pg_hba.conf, i.e. do we treat every superuser there as
> being a member of every group.

Ah, sorry for the noise, that's fine (and I'm bit suprised it was a
one-liner, guess I should go look at the patch... ;).

	Thanks,

		Stephen


Attachments:

  [application/pgp-signature] signature.asc (198B, ../../[email protected]/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* Re: superusers are members of all roles?
  2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
  2011-09-12 01:40 ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
@ 2011-11-02 19:27   ` Andrew Dunstan <[email protected]>
  2011-11-03 01:41     ` Re: superusers are members of all roles? Robert Haas <[email protected]>
  1 sibling, 1 reply; 974+ messages in thread

From: Andrew Dunstan @ 2011-11-02 19:27 UTC (permalink / raw)
  To: Bruce Momjian <[email protected]>; +Cc: Robert Haas <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers



On 09/11/2011 09:40 PM, Andrew Dunstan wrote:
>
>
> On 09/09/2011 11:34 PM, Bruce Momjian wrote:
>> Robert Haas wrote:
>>> On Sat, May 7, 2011 at 11:42 PM, Bruce Momjian<[email protected]>  
>>> wrote:
>>>> Is this a TODO?
>>> I think so.
>> Added to TODO:
>>
>>     Address problem where superusers are assumed to be members of all 
>> groups
>>
>>         
>> http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php
>
> This turns out to be a one-liner.
>
>

Patch with a small docs addition also. Adding to Nov commitfest.

cheers

andrew




Attachments:

  [text/x-patch] nosuperhbagroup.patch (1.6K, ../../[email protected]/2-nosuperhbagroup.patch)
  download | inline diff:
diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml
index 5d543cb..baed090 100644
--- a/doc/src/sgml/client-auth.sgml
+++ b/doc/src/sgml/client-auth.sgml
@@ -210,7 +210,10 @@ hostnossl  <replaceable>database</replaceable>  <replaceable>user</replaceable>
        in <productname>PostgreSQL</>; a <literal>+</> mark really means
        <quote>match any of the roles that are directly or indirectly members
        of this role</>, while a name without a <literal>+</> mark matches
-       only that specific role.)
+       only that specific role.) For this purpose, a superuser is only
+       considered to be a member of a role if they are explicitly a member
+       of the role, directly or indirectly, and not just by virtue of
+       being a superuser.
        Multiple user names can be supplied by separating them with commas.
        A separate file containing user names can be specified by preceding the
        file name with <literal>@</>.
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 1ee030f..1c84a60 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -442,8 +442,13 @@ is_member(Oid userid, const char *role)
 	if (!OidIsValid(roleid))
 		return false;			/* if target role not exist, say "no" */
 
-	/* See if user is directly or indirectly a member of role */
-	return is_member_of_role(userid, roleid);
+	/* 
+	 * See if user is directly or indirectly a member of role.
+	 * For this purpose, a superuser is not considered to be automatically
+	 * a member of the role, so group auth only applies to explicit
+	 * membership.
+	 */
+	return is_member_of_role_nosuper(userid, roleid);
 }
 
 /*


^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* Re: superusers are members of all roles?
  2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
  2011-09-12 01:40 ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
  2011-11-02 19:27   ` Re: superusers are members of all roles? Andrew Dunstan <[email protected]>
@ 2011-11-03 01:41     ` Robert Haas <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Robert Haas @ 2011-11-03 01:41 UTC (permalink / raw)
  To: Andrew Dunstan <[email protected]>; +Cc: Bruce Momjian <[email protected]>; Tom Lane <[email protected]>; pgsql-hackers

On Wed, Nov 2, 2011 at 3:27 PM, Andrew Dunstan <[email protected]> wrote:
> Patch with a small docs addition also. Adding to Nov commitfest.

I have reviewed this and it looks good to me.  Marking Ready for Committer.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 974+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 974+ messages in thread


end of thread, other threads:[~2026-03-12 15:09 UTC | newest]

Thread overview: 974+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-09-10 03:34 Re: superusers are members of all roles? Bruce Momjian <[email protected]>
2011-09-12 01:40 ` Andrew Dunstan <[email protected]>
2011-09-12 02:32   ` Stephen Frost <[email protected]>
2011-09-12 03:27     ` Robert Haas <[email protected]>
2011-09-12 03:29     ` Andrew Dunstan <[email protected]>
2011-09-12 09:55       ` Stephen Frost <[email protected]>
2011-11-02 19:27   ` Andrew Dunstan <[email protected]>
2011-11-03 01:41     ` Robert Haas <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>

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