pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove AELs from subxids correctly on standby
Date: Sat, 16 Jun 2018 13:08:36 +0000
Message-ID: <E1fUAwW-0002Yk-In@gemulon.postgresql.org> (raw)

Remove AELs from subxids correctly on standby

Issues relate only to subtransactions that hold AccessExclusiveLocks
when replayed on standby.

Prior to PG10, aborting subtransactions that held an
AccessExclusiveLock failed to release the lock until top level commit or
abort. 49bff5300d527 fixed that.

However, 49bff5300d527 also introduced a similar bug where subtransaction
commit would fail to release an AccessExclusiveLock, leaving the lock to
be removed sometimes early and sometimes late. This commit fixes
that bug also. Backpatch to PG10 needed.

Tested by observation. Note need for multi-node isolationtester to improve
test coverage for this and other HS cases.

Reported-by: Simon Riggs
Author: Simon Riggs

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/15378c1a15390a2b4c315f19f1644af46c7e3a15

Modified Files
--------------
src/backend/access/transam/xact.c   |  6 ++----
src/backend/storage/ipc/procarray.c |  5 +----
src/backend/storage/ipc/standby.c   | 24 +++---------------------
src/include/storage/standby.h       |  2 +-
4 files changed, 7 insertions(+), 30 deletions(-)



Message-ID: <E1fUAwW-0002Yk-In@gemulon.postgresql.org>
Permalink:  ../E1fUAwW-0002Yk-In@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fUAwW-0002Yk-In@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: simon@2ndQuadrant.com
  Subject: Re: pgsql: Remove AELs from subxids correctly on standby
  In-Reply-To: <E1fUAwW-0002Yk-In@gemulon.postgresql.org>
  References: <E1fUAwW-0002Yk-In@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