agora inbox for [email protected]  
help / color / mirror / Atom feed
pspg pager is finished
977+ messages / 7 participants
[nested] [flat]

* pspg pager is finished
@ 2021-03-20 03:34 Pavel Stehule <[email protected]>
  2021-03-20 03:46 ` Re: pspg pager is finished Julien Rouhaud <[email protected]>
  2021-03-20 06:51 ` Re: pspg pager is finished Vik Fearing <[email protected]>
  2021-03-20 16:01 ` Re: pspg pager is finished Nikolay Samokhvalov <[email protected]>
  2021-03-20 17:38 ` Re: pspg pager is finished dinesh kumar <[email protected]>
  2021-03-20 23:47 ` Re: pspg pager is finished Thomas Munro <[email protected]>
  0 siblings, 5 replies; 977+ messages in thread

From: Pavel Stehule @ 2021-03-20 03:34 UTC (permalink / raw)
  To: PostgreSQL Hackers <[email protected]>

Hi

I finished work on pspg.

https://github.com/okbob/pspg

Now it has special features like rows or block selection by mouse, and
export related data to file or to clipboard in csv or tsv or insert
formats. Some basic features like sorting data per selected columns are
possible too.

I hope this tool will serve well, and so work with Postgres (or other
supported databases) in the terminal will be more comfortable and more
efficient.

Regards

Pavel Stehule


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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
@ 2021-03-20 03:46 ` Julien Rouhaud <[email protected]>
  2021-03-20 06:13   ` Re: pspg pager is finished Pavel Stehule <[email protected]>
  4 siblings, 1 reply; 977+ messages in thread

From: Julien Rouhaud @ 2021-03-20 03:46 UTC (permalink / raw)
  To: Pavel Stehule <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

On Sat, Mar 20, 2021 at 04:34:30AM +0100, Pavel Stehule wrote:
> Hi
> 
> I finished work on pspg.
> 
> https://github.com/okbob/pspg
> 
> Now it has special features like rows or block selection by mouse, and
> export related data to file or to clipboard in csv or tsv or insert
> formats. Some basic features like sorting data per selected columns are
> possible too.
> 
> I hope this tool will serve well, and so work with Postgres (or other
> supported databases) in the terminal will be more comfortable and more
> efficient.

Thanks a lot for that tool Pavel.  It has been my favorite psql pager for
years!





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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
  2021-03-20 03:46 ` Re: pspg pager is finished Julien Rouhaud <[email protected]>
@ 2021-03-20 06:13   ` Pavel Stehule <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Pavel Stehule @ 2021-03-20 06:13 UTC (permalink / raw)
  To: Julien Rouhaud <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

so 20. 3. 2021 v 4:45 odesílatel Julien Rouhaud <[email protected]> napsal:

> On Sat, Mar 20, 2021 at 04:34:30AM +0100, Pavel Stehule wrote:
> > Hi
> >
> > I finished work on pspg.
> >
> > https://github.com/okbob/pspg
> >
> > Now it has special features like rows or block selection by mouse, and
> > export related data to file or to clipboard in csv or tsv or insert
> > formats. Some basic features like sorting data per selected columns are
> > possible too.
> >
> > I hope this tool will serve well, and so work with Postgres (or other
> > supported databases) in the terminal will be more comfortable and more
> > efficient.
>
> Thanks a lot for that tool Pavel.  It has been my favorite psql pager for
> years!
>

Thank you

Pavel


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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
@ 2021-03-20 06:51 ` Vik Fearing <[email protected]>
  2021-03-20 10:51   ` Re: pspg pager is finished Pavel Stehule <[email protected]>
  4 siblings, 1 reply; 977+ messages in thread

From: Vik Fearing @ 2021-03-20 06:51 UTC (permalink / raw)
  To: Pavel Stehule <[email protected]>; PostgreSQL Hackers <[email protected]>

On 3/20/21 4:34 AM, Pavel Stehule wrote:
> Hi
> 
> I finished work on pspg.
> 
> https://github.com/okbob/pspg
> 
> Now it has special features like rows or block selection by mouse, and
> export related data to file or to clipboard in csv or tsv or insert
> formats. Some basic features like sorting data per selected columns are
> possible too.
> 
> I hope this tool will serve well, and so work with Postgres (or other
> supported databases) in the terminal will be more comfortable and more
> efficient.

If this means active development on it is finished, I would like to see
this integrated into the tree, perhaps even directly into psql itself
(unless the user chooses a different pager).  It is that useful.

Thank you, Pavel, for this work.
-- 
Vik Fearing





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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
  2021-03-20 06:51 ` Re: pspg pager is finished Vik Fearing <[email protected]>
@ 2021-03-20 10:51   ` Pavel Stehule <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Pavel Stehule @ 2021-03-20 10:51 UTC (permalink / raw)
  To: Vik Fearing <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

so 20. 3. 2021 v 7:51 odesílatel Vik Fearing <[email protected]>
napsal:

> On 3/20/21 4:34 AM, Pavel Stehule wrote:
> > Hi
> >
> > I finished work on pspg.
> >
> > https://github.com/okbob/pspg
> >
> > Now it has special features like rows or block selection by mouse, and
> > export related data to file or to clipboard in csv or tsv or insert
> > formats. Some basic features like sorting data per selected columns are
> > possible too.
> >
> > I hope this tool will serve well, and so work with Postgres (or other
> > supported databases) in the terminal will be more comfortable and more
> > efficient.
>
> If this means active development on it is finished, I would like to see
> this integrated into the tree, perhaps even directly into psql itself
> (unless the user chooses a different pager).  It is that useful.
>

yes, - almost all my ideas are implemented - and I have no plans to write
pspg as a light spreadsheet. It is just a pager.

Unfortunately, the source code of pspg has not required postgres quality. I
wrote it mostly alone without reviews and without initial experience with
this kind of application. Some implemented interactive features are very
complex (for terminal applications), and not too simply understandable. The
code is not too bad, if I compare it with source code of "more" or "less",
but again, there was not any check of other eyes. There are not any regress
tests, so I don't think so integration too core can be a good idea. Review
of about 35000 lines can be terrible work, but this project needs it  to
move forward . On second hand, it uses a lot of Postgres C patterns. And
any new development can be more concentrated on quality and less to
research.

Although pspg has not Postgres quality, it is a good tool that is used by a
lot of people. Can be nice to be propagated inside Postgres documentation,
or some Postgres demos.

pspg is now in my private repository (and although it uses BSD licence), I
will be proud if it can be moved to some community repository, and if the
community takes more control and all rights to this project.

Now, I would work more on other projects than pspg - and then pspg will be
in maintenance mode. I'll fix all reported errors.


> Thank you, Pavel, for this work.
>

Thank you :)

Pavel

-- 
> Vik Fearing
>


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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
@ 2021-03-20 16:01 ` Nikolay Samokhvalov <[email protected]>
  2021-03-20 16:13   ` Re: pspg pager is finished Pavel Stehule <[email protected]>
  4 siblings, 1 reply; 977+ messages in thread

From: Nikolay Samokhvalov @ 2021-03-20 16:01 UTC (permalink / raw)
  To: Pavel Stehule <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

On Fri, Mar 19, 2021 at 20:35 Pavel Stehule <[email protected]> wrote:

> Hi
>
> I finished work on pspg.
>
> https://github.com/okbob/pspg
>

Thank you, Pavel. I use it always when possible, and highly recommend it to
others.

> <https://github.com/okbob/pspg;
>
Nik


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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
  2021-03-20 16:01 ` Re: pspg pager is finished Nikolay Samokhvalov <[email protected]>
@ 2021-03-20 16:13   ` Pavel Stehule <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Pavel Stehule @ 2021-03-20 16:13 UTC (permalink / raw)
  To: Nikolay Samokhvalov <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

so 20. 3. 2021 v 17:01 odesílatel Nikolay Samokhvalov <[email protected]>
napsal:

> On Fri, Mar 19, 2021 at 20:35 Pavel Stehule <[email protected]>
> wrote:
>
>> Hi
>>
>> I finished work on pspg.
>>
>> https://github.com/okbob/pspg
>>
>
> Thank you, Pavel. I use it always when possible, and highly recommend it
> to others.
>
>> <https://github.com/okbob/pspg;
>>
> Nik
>

Thank you

Pavel


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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
@ 2021-03-20 17:38 ` dinesh kumar <[email protected]>
  4 siblings, 0 replies; 977+ messages in thread

From: dinesh kumar @ 2021-03-20 17:38 UTC (permalink / raw)
  To: Pavel Stehule <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

On Sat, Mar 20, 2021 at 9:05 AM Pavel Stehule <[email protected]>
wrote:

> Hi
>
> I finished work on pspg.
>
> https://github.com/okbob/pspg
>
> Now it has special features like rows or block selection by mouse, and
> export related data to file or to clipboard in csv or tsv or insert
> formats. Some basic features like sorting data per selected columns are
> possible too.
>
> I hope this tool will serve well, and so work with Postgres (or other
> supported databases) in the terminal will be more comfortable and more
> efficient.
>
> Regards
>
> Pavel Stehule
>

It's awesome Pavel,

Building UI at console level is a serious stuff, and I love it.
Thank you so much for all your efforts.

-- 

Regards,
Dinesh
manojadinesh.blogspot.com


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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
@ 2021-03-20 23:47 ` Thomas Munro <[email protected]>
  2021-03-21 05:22   ` Re: pspg pager is finished Pavel Stehule <[email protected]>
  4 siblings, 1 reply; 977+ messages in thread

From: Thomas Munro @ 2021-03-20 23:47 UTC (permalink / raw)
  To: Pavel Stehule <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

On Sat, Mar 20, 2021 at 4:35 PM Pavel Stehule <[email protected]> wrote:
> I finished work on pspg.

tmunro@x1:~/projects/postgresql$ pspg --stream --graph
pspg: unrecognized option '--graph'
Try pspg --help

Hmm, seems to be not finished :-)





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

* Re: pspg pager is finished
  2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
  2021-03-20 23:47 ` Re: pspg pager is finished Thomas Munro <[email protected]>
@ 2021-03-21 05:22   ` Pavel Stehule <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Pavel Stehule @ 2021-03-21 05:22 UTC (permalink / raw)
  To: Thomas Munro <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>

ne 21. 3. 2021 v 0:48 odesílatel Thomas Munro <[email protected]>
napsal:

> On Sat, Mar 20, 2021 at 4:35 PM Pavel Stehule <[email protected]>
> wrote:
> > I finished work on pspg.
>
> tmunro@x1:~/projects/postgresql$ pspg --stream --graph
> pspg: unrecognized option '--graph'
> Try pspg --help
>
> Hmm, seems to be not finished :-)
>

:-)


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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


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



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

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

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

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

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


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread

* [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid
@ 2026-03-12 15:09 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 977+ messages in thread

From: Álvaro Herrera @ 2026-03-12 15:09 UTC (permalink / raw)

---
 src/backend/commands/cluster.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index af47354e382..29440fb75cd 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2814,7 +2814,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 		 * Whether we could read new record or not, keep checking if
 		 * 'lsn_upto' was specified.
 		 */
-		if (XLogRecPtrIsInvalid(lsn_upto))
+		if (!XLogRecPtrIsValid(lsn_upto))
 		{
 			SpinLockAcquire(&shared->mutex);
 			lsn_upto = shared->lsn_upto;
@@ -2822,7 +2822,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			done = shared->done;
 			SpinLockRelease(&shared->mutex);
 		}
-		if (!XLogRecPtrIsInvalid(lsn_upto) &&
+		if (XLogRecPtrIsValid(lsn_upto) &&
 			ctx->reader->EndRecPtr >= lsn_upto)
 			break;
 
@@ -2846,7 +2846,7 @@ decode_concurrent_changes(LogicalDecodingContext *ctx,
 			 * If lsn_upto is valid, WAL records having LSN lower than that
 			 * should already have been flushed to disk.
 			 */
-			if (XLogRecPtrIsInvalid(lsn_upto))
+			if (!XLogRecPtrIsValid(lsn_upto))
 				timeout = 100L;
 			res = WaitForLSN(WAIT_LSN_TYPE_PRIMARY_FLUSH,
 							 ctx->reader->EndRecPtr + 1,
@@ -4039,7 +4039,7 @@ repack_worker_internal(dsm_segment *seg)
 	 * anything in the shared memory until we have serialized the snapshot.
 	 */
 	SpinLockAcquire(&shared->mutex);
-	Assert(XLogRecPtrIsInvalid(shared->lsn_upto));
+	Assert(!XLogRecPtrIsValid(shared->lsn_upto));
 	sfs = &shared->sfs;
 	SpinLockRelease(&shared->mutex);
 
-- 
2.47.3


--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename="0005-document-store_change-somewhat-more.nocfbot.txt"



^ permalink  raw  reply  [nested|flat] 977+ messages in thread


end of thread, other threads:[~2026-03-12 15:09 UTC | newest]

Thread overview: 977+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-20 03:34 pspg pager is finished Pavel Stehule <[email protected]>
2021-03-20 03:46 ` Julien Rouhaud <[email protected]>
2021-03-20 06:13   ` Pavel Stehule <[email protected]>
2021-03-20 06:51 ` Vik Fearing <[email protected]>
2021-03-20 10:51   ` Pavel Stehule <[email protected]>
2021-03-20 16:01 ` Nikolay Samokhvalov <[email protected]>
2021-03-20 16:13   ` Pavel Stehule <[email protected]>
2021-03-20 17:38 ` dinesh kumar <[email protected]>
2021-03-20 23:47 ` Thomas Munro <[email protected]>
2021-03-21 05:22   ` Pavel Stehule <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15:09 [PATCH 4/9] XLogRecPtrIsInvalid -> XLogRecPtrIsValid Álvaro Herrera <[email protected]>
2026-03-12 15: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