Search Postgresql Archives

Re: Corrupt database? 8.1/FreeBSD6.0

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

 



Alvaro Herrera <alvherre@xxxxxxxxxxxxxxxxx> writes:
> Tom Lane wrote:
>> But it seems that we need a band-aid for 8.1 and earlier.  The simplest
>> fix I can think of is for vacuum not to attempt to advance the
>> datvacuumxid/datfrozenxid fields if it skipped over any temp tables of
>> other backends.  That's a bit nasty, since in a database making heavy
>> use of temp tables, you might do a whole lot of vacuums without ever
>> meeting that condition.  Anyone have a better idea?

> That seems nasty.  Can we examine the xmin of the pg_class entry for
> temp tables instead?

No, because any sort of schema update on the temp table would rewrite
its pg_class row with a newer version.  You couldn't assume that the
pg_class row is older than what's in the table.  Consider this perfectly
reasonable scenario:

	CREATE TEMP TABLE foo ...
	COPY foo FROM ...
	CREATE INDEX ...		<- must set relhasindex


			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