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

Re: [COMMITTERS] pgsql: Create a "relation mapping" infrastructure to support changing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Create a "relation mapping" infrastructure to support changing
Date: 2010-02-08 15:15:47
Message-ID: 10292.1265642147@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> I just noticed that this patch

>> Create a "relation mapping" infrastructure to support changing the relfilenodes
>> of shared or nailed system catalogs.  This has two key benefits:

> creates a new function pg_relation_filenode() that only uses the
> syscache to fetch the relation's filenode, without locking it.  I wonder
> if we could do the same in the pg_relation_size() function and friends,
> to avoid having to grab a lock on the relation.

I don't think it's a good idea to try to do physical access to the
relation without any lock.  The filenode function is a bit special
because it doesn't need anything except the pg_class row itself.
(Except in the case of a mapped relationn, but the underlying
mapping entry is unlikely to disappear, too.)

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2010-02-08 15:25:36
Subject: Re: damage control mode
Previous:From: Greg Sabino MullaneDate: 2010-02-08 14:32:08
Subject: Re: Confusion over Python drivers

pgsql-committers by date

Next:From: Tom LaneDate: 2010-02-08 15:51:51
Subject: Re: pgsql: Add C comments that HEAP_MOVED_* define usage is only for pre-9.0
Previous:From: Bruce MomjianDate: 2010-02-08 14:10:21
Subject: pgsql: Add C comments that HEAP_MOVED_* define usage is only for pre-9.0

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