pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix test_decoding's handling of nonexistant columns in old tuple
Date: Sat, 27 Jun 2015 17:23:16 +0000
Message-ID: <E1Z8toy-0006U2-JK@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix test_decoding's handling of nonexistant columns in old tuple versions.

test_decoding used fastgetattr() to extract column values. That's wrong
when decoding updates and deletes if a table's replica identity is set
to FULL and new columns have been added since the old version of the
tuple was created. Due to the lack of a crosscheck with the datum's
natts values an invalid value will be output, leading to errors or
worse.

Bug: #13470
Reported-By: Krzysztof Kotlarski
Discussion: 20150626100333.3874.90852@wrigleys.postgresql.org

Backpatch to 9.4, where the feature, including the bug, was added.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ed6c8d73619a69c8751c8662242fdce22d31bc42

Modified Files
--------------
contrib/test_decoding/expected/ddl.out |   14 ++++++++++++--
contrib/test_decoding/sql/ddl.sql      |    4 ++++
contrib/test_decoding/test_decoding.c  |    2 +-
3 files changed, 17 insertions(+), 3 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (2+ messages)

Message-ID: <E1Z8toy-0006U2-JK@gemulon.postgresql.org>
Permalink:  ../E1Z8toy-0006U2-JK@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Z8toy-0006U2-JK@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: andres@anarazel.de
  Subject: Re: pgsql: Fix test_decoding's handling of nonexistant columns in old tuple
  In-Reply-To: <E1Z8toy-0006U2-JK@gemulon.postgresql.org>
  References: <E1Z8toy-0006U2-JK@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