Re: [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address
Date: 2011-06-22 03:04:51
Message-ID: 16527.1308711891@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Some of the refactoring you've done here seems likely to break things,
> because you're basically making the relation locking happen later than
> it does not, and that's going to cause problems.
> get_object_address_relobject() is a particularly egregious
> rearrangement. It seems to me that the right formula is to call
> relation_openrv() if missing_ok is false, and try_relation_openrv() if
> missing_ok is true. But that's sort of a pain, so I propose to first
> apply the attached patch, which gets rid of try_relation_openrv() and
> try_heap_openrv() and instead adds a missing_ok argument to
> relation_openrv() and heap_openrv(). If we do this, then the
> missing_ok argument can just be passed through all the way down.

> Thoughts? Comments? Objections?

At least the last hunk (in pltcl.c) seems to have the flag backwards.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-06-22 03:05:17 Indication of db-shared tables
Previous Message Robert Haas 2011-06-22 02:58:21 Re: smallserial / serial2