Re: pg_relation_size locking - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_relation_size locking
Date
Msg-id 20051212160552.GA22135@surnet.cl
Whole thread Raw
In response to Re: pg_relation_size locking  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> In the above example, the contrib code would have not done the right
> thing at all --- if I'm not mistaken, it would have kept handing back
> the size of the original, pre-TRUNCATE file, since the new pg_class
> row with the new relfilenode isn't committed yet.  So it wouldn't have
> done what you wish anyway.

It wouldn't have worked anyway because it used the Oid to search the
file, not the relfilenode.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_relation_size locking
Next
From: Tom Lane
Date:
Subject: Re: Different length lines in COPY CSV