pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rethink the delay-checkpoint-end mechanism in the back-branches.
Date: Thu, 14 Apr 2022 15:11:19 +0000
Message-ID: <E1nf17v-000Uq9-Up@gemulon.postgresql.org> (raw)

Rethink the delay-checkpoint-end mechanism in the back-branches.

The back-patch of commit bbace5697df12398e87ffd9879171c39d27f5b33 had
the unfortunate effect of changing the layout of PGPROC in the
back-branches, which could break extensions. This happened because it
changed the delayChkpt from type bool to type int. So, change it back,
and add a new bool delayChkptEnd field instead. The new field should
fall within what used to be padding space within the struct, and so
hopefully won't cause any extensions to break.

Per report from Markus Wanner and discussion with Tom Lane and others.

Patch originally by me, somewhat revised by Markus Wanner per a
suggestion from Michael Paquier. A very similar patch was developed
by Kyotaro Horiguchi, but I failed to see the email in which that was
posted before writing one of my own.

Discussion: http://postgr.es/m/CA+Tgmoao-kUD9c5nG5sub3F7tbo39+cdr8jKaOVEs_1aBWcJ3Q@mail.gmail.com
Discussion: http://postgr.es/m/20220406.164521.17171257901083417.horikyota.ntt@gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6270ee4450404225daad44b53d4a067026f97162

Modified Files
--------------
src/backend/access/transam/multixact.c  |  6 +--
src/backend/access/transam/twophase.c   | 15 +++---
src/backend/access/transam/xact.c       |  6 +--
src/backend/access/transam/xlog.c       | 10 ++--
src/backend/access/transam/xloginsert.c |  2 +-
src/backend/catalog/storage.c           |  6 +--
src/backend/storage/buffer/bufmgr.c     |  6 +--
src/backend/storage/ipc/procarray.c     | 96 +++++++++++++++++++++++++--------
src/include/storage/proc.h              | 40 ++++----------
src/include/storage/procarray.h         |  7 ++-
10 files changed, 114 insertions(+), 80 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1nf17v-000Uq9-Up@gemulon.postgresql.org>
Permalink:  ../E1nf17v-000Uq9-Up@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nf17v-000Uq9-Up@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Rethink the delay-checkpoint-end mechanism in the back-branches.
  In-Reply-To: <E1nf17v-000Uq9-Up@gemulon.postgresql.org>
  References: <E1nf17v-000Uq9-Up@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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