pgsql: Fix two problems in infer_arbiter_indexes().

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix two problems in infer_arbiter_indexes().
Date: 2015-05-08 20:28:56
Message-ID: E1YqotE-00030x-9M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix two problems in infer_arbiter_indexes().

The first is a pretty simple bug where a relcache entry is used after
the relation is closed. In this particular situation it does not appear
to have bad consequences unless compiled with RELCACHE_FORCE_RELEASE.

The second is that infer_arbiter_indexes() skipped indexes that aren't
yet valid according to indcheckxmin. That's not required here, because
uniqueness checks don't care about visibility according to an older
snapshot. While thats not really a bug, it makes things undesirably
non-deterministic. There is some hope that this explains a test failure
on buildfarm member jaguarundi.

Discussion: 9096(dot)1431102730(at)sss(dot)pgh(dot)pa(dot)us

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/util/plancat.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2015-05-08 23:09:42 pgsql: Add pg_file_settings view and function
Previous Message Heikki Linnakangas 2015-05-08 19:07:42 pgsql: Add macros to check if a filename is a WAL segment or other such