Re: no error context for index updates?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: no error context for index updates?
Date: 2012-01-31 22:23:04
Message-ID: 12045.1328048584@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Any ideas whether we could make this happen?

Presumably you could do it by setting up an error context stack entry
within FormIndexDatum. I'd want to be convinced that there was no
performance hit, but if you were to do it only in the expression-column
code path that would probably put it into the noise. (So you could
actually mention the particular index column name, too, if you had a
mind to do that.)

[ pokes around a bit... ] The major issue appears to be that
FormIndexDatum doesn't actually receive anything that tells it the index
name. I'm not sure why we don't have a Relation pointer for the index
in there, but it looks like most of the work would be to verify that
that's safe --- are there any code paths where the index rel wouldn't
stay open for the lifetime of the IndexInfo node? Or maybe, since
IndexInfo *is* a node and Relation isn't, it'd be better to just make
callers pass the index Relation separately.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2012-01-31 22:24:08 Re: Index-only scan performance regression
Previous Message Joachim Wieland 2012-01-31 21:46:14 Re: patch for parallel pg_dump