Search Postgresql Archives

Re: Is the "ACCESS EXCLUSIVE" lock for TRUNCATE really necessary?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Florian G. Pflug" <fgp@xxxxxxxx> writes:
> Now, I was thinking if TRUNCATE couldn't just let relfilenode in
> pg_class point to a new datafile, and leave the old one in place.

Until when?  How would you synchronize the switchover?

> VACUUM could then remove datafiles when it purges a record from pg_class.

And how would you prevent VACUUM from doing so incorrectly?  The fact
that pg_class contains a dead record is not ordinarily an indication
that the relfilenode mentioned in the record is not needed anymore.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux