[Resend: apparently there's a problem with my mail server]

Andreas Pflug wrote:
> Until recently, pg_relation_size used SearchSysCache to locate the 
> relation to examine, and calculated the file location from that 
> information. Starting with dbsize.c V1.5 (committed after Beta2), 
> relation_open(.., AccessShareLock) is used. This is very unfortunate 
> because it will not allow to observe a table growing while it is 
> populated, e.g. with a lengthy COPY; pg_relation_size will be blocked. 
> After reverting to 1.4, everything was fine again.

The diff:
http://projects.commandprompt.com/projects/public/pgsql/changeset/23120

The problem with the original coding was that it used the table Oid to
look up the file name, which is wrong.  (Test it with a table that has
been clustered or an index that has been reindexed.)

We could use a SysCache on filenode, if there was one.  Unfortunately I
don't think we have it.

> Can we have this reverted/fixed?

If you can see a way without reintroducing the old bugs, let me know.


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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to