pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix corruption of pg_shdepend when copying deps from template da
Date: Thu, 21 Oct 2021 01:42:23 +0000
Message-ID: <E1mdN67-0005M3-O8@gemulon.postgresql.org> (raw)

Fix corruption of pg_shdepend when copying deps from template database

Using for a new database a template database with shared dependencies
that need to be copied over was causing a corruption of pg_shdepend
because of an off-by-one computation error of the index number used for
the values inserted with a slot.

Issue introduced by e3931d0.  Monitoring the rest of the code, there are
no similar mistakes.

Reported-by: Sven Klemm
Author: Aleksander Alekseev
Reviewed-by: Daniel Gustafsson, Michael Paquier
Discussion: https://postgr.es/m/CAJ7c6TP0AowkUgNL6zcAK-s5HYsVHVBRWfu69FRubPpfwZGM9A@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5040c96415a062a1016e0a6b9a4dc9f26a7f356e

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



view thread (2+ messages)

Message-ID: <E1mdN67-0005M3-O8@gemulon.postgresql.org>
Permalink:  ../E1mdN67-0005M3-O8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mdN67-0005M3-O8@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: michael@paquier.xyz
  Subject: Re: pgsql: Fix corruption of pg_shdepend when copying deps from template da
  In-Reply-To: <E1mdN67-0005M3-O8@gemulon.postgresql.org>
  References: <E1mdN67-0005M3-O8@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