pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: In recordExtensionInitPriv(), keep the scan til we're done with
Date: Sat, 16 Apr 2016 01:57:25 +0000
Message-ID: <E1arFUD-0003AF-8C@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

In recordExtensionInitPriv(), keep the scan til we're done with it

For reasons of sheer brain fade, we (I) was calling systable_endscan()
immediately after systable_getnext() and expecting the tuple returned
by systable_getnext() to still be valid.

That's clearly wrong.  Move the systable_endscan() down below the tuple
usage.

Discovered initially by Pavel Stehule and then also by Alvaro.

Add a regression test based on Alvaro's testing.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/99f2f3c19ae7d6aa2950a9bdb549217c5a60d941

Modified Files
--------------
src/backend/catalog/aclchk.c                                  | 4 ++--
src/test/modules/test_extensions/Makefile                     | 6 +++---
src/test/modules/test_extensions/expected/test_extensions.out | 3 +++
src/test/modules/test_extensions/sql/test_extensions.sql      | 4 ++++
src/test/modules/test_extensions/test_ext6--1.0.sql           | 1 +
src/test/modules/test_extensions/test_ext6.control            | 5 +++++
6 files changed, 18 insertions(+), 5 deletions(-)


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


Message-ID: <E1arFUD-0003AF-8C@gemulon.postgresql.org>
Permalink:  ../E1arFUD-0003AF-8C@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1arFUD-0003AF-8C@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: sfrost@snowman.net
  Subject: Re: pgsql: In recordExtensionInitPriv(), keep the scan til we're done with
  In-Reply-To: <E1arFUD-0003AF-8C@gemulon.postgresql.org>
  References: <E1arFUD-0003AF-8C@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