pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: RelationTruncate() must set DELAY_CHKPT_START.
6+ messages / 1 participants
[nested] [flat]

* pgsql: RelationTruncate() must set DELAY_CHKPT_START.
@ 2024-12-02 21:32  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-12-02 21:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

RelationTruncate() must set DELAY_CHKPT_START.

Previously, it set only DELAY_CHKPT_COMPLETE. That was important,
because it meant that if the XLOG_SMGR_TRUNCATE record preceded a
XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also
happen on disk before the XLOG_CHECKPOINT_ONLINE record was
written.

However, it didn't guarantee that the sync request for the truncation
was processed before the XLOG_CHECKPOINT_ONLINE record was written. By
setting DELAY_CHKPT_START, we guarantee that if an XLOG_SMGR_TRUNCATE
record is written to WAL before the redo pointer of a concurrent
checkpoint, the sync request queued by that operation must be processed
by that checkpoint, rather than being left for the following one.

This is a refinement of commit 412ad7a5563.  Back-patch to all supported
releases, like that commit.

Author: Robert Haas <robertmhaas@gmail.com>
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2B-2rjGZC2kwqr2NMLBcEBp4uf59QT1advbWYF_uc%2B0Aw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/75818b3afbf850d600e0fcd1a3b03199077063f8

Modified Files
--------------
src/backend/catalog/storage.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)



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

* pgsql: RelationTruncate() must set DELAY_CHKPT_START.
@ 2024-12-02 21:32  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-12-02 21:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

RelationTruncate() must set DELAY_CHKPT_START.

Previously, it set only DELAY_CHKPT_COMPLETE. That was important,
because it meant that if the XLOG_SMGR_TRUNCATE record preceded a
XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also
happen on disk before the XLOG_CHECKPOINT_ONLINE record was
written.

However, it didn't guarantee that the sync request for the truncation
was processed before the XLOG_CHECKPOINT_ONLINE record was written. By
setting DELAY_CHKPT_START, we guarantee that if an XLOG_SMGR_TRUNCATE
record is written to WAL before the redo pointer of a concurrent
checkpoint, the sync request queued by that operation must be processed
by that checkpoint, rather than being left for the following one.

This is a refinement of commit 412ad7a5563.  Back-patch to all supported
releases, like that commit.

Author: Robert Haas <robertmhaas@gmail.com>
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2B-2rjGZC2kwqr2NMLBcEBp4uf59QT1advbWYF_uc%2B0Aw%40mail.gmail.com

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d4ffbf47b2d43fe3319474970948f276c8e2f8c9

Modified Files
--------------
src/backend/catalog/storage.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)



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

* pgsql: RelationTruncate() must set DELAY_CHKPT_START.
@ 2024-12-02 21:32  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-12-02 21:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

RelationTruncate() must set DELAY_CHKPT_START.

Previously, it set only DELAY_CHKPT_COMPLETE. That was important,
because it meant that if the XLOG_SMGR_TRUNCATE record preceded a
XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also
happen on disk before the XLOG_CHECKPOINT_ONLINE record was
written.

However, it didn't guarantee that the sync request for the truncation
was processed before the XLOG_CHECKPOINT_ONLINE record was written. By
setting DELAY_CHKPT_START, we guarantee that if an XLOG_SMGR_TRUNCATE
record is written to WAL before the redo pointer of a concurrent
checkpoint, the sync request queued by that operation must be processed
by that checkpoint, rather than being left for the following one.

This is a refinement of commit 412ad7a5563.  Back-patch to all supported
releases, like that commit.

Author: Robert Haas <robertmhaas@gmail.com>
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2B-2rjGZC2kwqr2NMLBcEBp4uf59QT1advbWYF_uc%2B0Aw%40mail.gmail.com

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ad5aa7bfd042c9d0588f206f4c4ac65c3203bd48

Modified Files
--------------
src/backend/catalog/storage.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)



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

* pgsql: RelationTruncate() must set DELAY_CHKPT_START.
@ 2024-12-02 21:32  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-12-02 21:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

RelationTruncate() must set DELAY_CHKPT_START.

Previously, it set only DELAY_CHKPT_COMPLETE. That was important,
because it meant that if the XLOG_SMGR_TRUNCATE record preceded a
XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also
happen on disk before the XLOG_CHECKPOINT_ONLINE record was
written.

However, it didn't guarantee that the sync request for the truncation
was processed before the XLOG_CHECKPOINT_ONLINE record was written. By
setting DELAY_CHKPT_START, we guarantee that if an XLOG_SMGR_TRUNCATE
record is written to WAL before the redo pointer of a concurrent
checkpoint, the sync request queued by that operation must be processed
by that checkpoint, rather than being left for the following one.

This is a refinement of commit 412ad7a5563.  Back-patch to all supported
releases, like that commit.

Author: Robert Haas <robertmhaas@gmail.com>
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2B-2rjGZC2kwqr2NMLBcEBp4uf59QT1advbWYF_uc%2B0Aw%40mail.gmail.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a501fe5a971ed06c50f173406c4184b3d32cdf93

Modified Files
--------------
src/backend/catalog/storage.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)



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

* pgsql: RelationTruncate() must set DELAY_CHKPT_START.
@ 2024-12-02 21:33  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-12-02 21:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

RelationTruncate() must set DELAY_CHKPT_START.

Previously, it set only DELAY_CHKPT_COMPLETE. That was important,
because it meant that if the XLOG_SMGR_TRUNCATE record preceded a
XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also
happen on disk before the XLOG_CHECKPOINT_ONLINE record was
written.

However, it didn't guarantee that the sync request for the truncation
was processed before the XLOG_CHECKPOINT_ONLINE record was written. By
setting DELAY_CHKPT_START, we guarantee that if an XLOG_SMGR_TRUNCATE
record is written to WAL before the redo pointer of a concurrent
checkpoint, the sync request queued by that operation must be processed
by that checkpoint, rather than being left for the following one.

This is a refinement of commit 412ad7a5563.  Back-patch to all supported
releases, like that commit.

Author: Robert Haas <robertmhaas@gmail.com>
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2B-2rjGZC2kwqr2NMLBcEBp4uf59QT1advbWYF_uc%2B0Aw%40mail.gmail.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7d0b91a28421a7928fb45e10b31e7f1f81842ba7

Modified Files
--------------
src/backend/catalog/storage.c | 36 ++++++++++++++++++++++++++----------
1 file changed, 26 insertions(+), 10 deletions(-)



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

* pgsql: RelationTruncate() must set DELAY_CHKPT_START.
@ 2024-12-02 21:33  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2024-12-02 21:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

RelationTruncate() must set DELAY_CHKPT_START.

Previously, it set only DELAY_CHKPT_COMPLETE. That was important,
because it meant that if the XLOG_SMGR_TRUNCATE record preceded a
XLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would also
happen on disk before the XLOG_CHECKPOINT_ONLINE record was
written.

However, it didn't guarantee that the sync request for the truncation
was processed before the XLOG_CHECKPOINT_ONLINE record was written. By
setting DELAY_CHKPT_START, we guarantee that if an XLOG_SMGR_TRUNCATE
record is written to WAL before the redo pointer of a concurrent
checkpoint, the sync request queued by that operation must be processed
by that checkpoint, rather than being left for the following one.

This is a refinement of commit 412ad7a5563.  Back-patch to all supported
releases, like that commit.

Author: Robert Haas <robertmhaas@gmail.com>
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2B-2rjGZC2kwqr2NMLBcEBp4uf59QT1advbWYF_uc%2B0Aw%40mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1168acbca475d48f745b345f69389df11f2396aa

Modified Files
--------------
src/backend/catalog/storage.c | 36 ++++++++++++++++++++++++++----------
1 file changed, 26 insertions(+), 10 deletions(-)



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


end of thread, other threads:[~2024-12-02 21:33 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-02 21:32 pgsql: RelationTruncate() must set DELAY_CHKPT_START. Thomas Munro <tmunro@postgresql.org>
2024-12-02 21:32 pgsql: RelationTruncate() must set DELAY_CHKPT_START. Thomas Munro <tmunro@postgresql.org>
2024-12-02 21:32 pgsql: RelationTruncate() must set DELAY_CHKPT_START. Thomas Munro <tmunro@postgresql.org>
2024-12-02 21:32 pgsql: RelationTruncate() must set DELAY_CHKPT_START. Thomas Munro <tmunro@postgresql.org>
2024-12-02 21:33 pgsql: RelationTruncate() must set DELAY_CHKPT_START. Thomas Munro <tmunro@postgresql.org>
2024-12-02 21:33 pgsql: RelationTruncate() must set DELAY_CHKPT_START. Thomas Munro <tmunro@postgresql.org>

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