pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check slot->restart_lsn validity in a few more places
Date: Wed, 29 Apr 2020 00:42:46 +0000
Message-ID: <E1jTaoI-0001pn-OO@gemulon.postgresql.org> (raw)

Check slot->restart_lsn validity in a few more places

Lack of these checks could cause visible misbehavior, including
assertion failures.  This was missed in commit c6550776394e, whereby
restart_lsn becomes invalid when the size limit is exceeded.

Also reword some existing error messages, and add errdetail(), so that
the reported errors all match in spirit.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20200408.093710.447591748588426656.horikyota.ntt@gmail.com

Branch
------
master

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

Modified Files
--------------
contrib/test_decoding/expected/slot.out        |  3 ++-
src/backend/replication/logical/logicalfuncs.c | 13 +++++++++++++
src/backend/replication/slotfuncs.c            |  4 +++-
src/backend/replication/walsender.c            | 14 +++++++++++++-
4 files changed, 31 insertions(+), 3 deletions(-)



Message-ID: <E1jTaoI-0001pn-OO@gemulon.postgresql.org>
Permalink:  ../E1jTaoI-0001pn-OO@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jTaoI-0001pn-OO@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: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Check slot->restart_lsn validity in a few more places
  In-Reply-To: <E1jTaoI-0001pn-OO@gemulon.postgresql.org>
  References: <E1jTaoI-0001pn-OO@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