Skip site navigation (1) Skip section navigation (2)

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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: 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 01:50:14
Message-ID: BANLkTim2i=L+BkK9fcfUOeF6oCXv_=b6yg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sun, Jun 19, 2011 at 7:40 AM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
> Sorry, the previous revision did not update regression test part
> towards the latest one.

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?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment: there-is-no-try.patch
Description: application/octet-stream (21.5 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-06-22 01:54:49
Subject: Re: SSI tuning points
Previous:From: Andrew DunstanDate: 2011-06-22 00:27:45
Subject: WIP pgindent replacement

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group