Improve WAIT FOR read-your-writes consistency doc - Mailing list pgsql-hackers

From Sami Imseih
Subject Improve WAIT FOR read-your-writes consistency doc
Date
Msg-id CAN12+YKN7gXb1o9bDWgfA=6wjDrqNEgt+rXJiAWXgPCXQ5TqpA@mail.gmail.com
Whole thread
Responses Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks
List pgsql-hackers
The WAIT FOR docs say that "The standby_replay mode waits for the LSN to be
replayed (applied to the database), which is useful to achieve read-your-writes
consistency while using an async replica for reads and the primary for writes."

I think that needs one more caveat.

WAIT FOR success does not guarantee read-your-writes if the supplied LSN
is before the transaction's COMMIT record.

Maybe the last sentence should be qualified with:

" .... the primary for writes, provided that the target LSN was
captured after COMMIT on the primary."

This may be obvious to users of this feature, but perhaps worth being
more explicit about it.

Thoughts?

--
Sami Imseih
Amazon Web Services (AWS)



Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Trying to break online checksums with LLMs
Next
From: Fujii Masao
Date:
Subject: Re: pg_stat_progress_cluster: do not default to CLUSTER