Re: How to avoid transaction ID wrap - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: How to avoid transaction ID wrap
Date
Msg-id 20060606184758.GE2263@surnet.cl
Whole thread Raw
In response to Re: How to avoid transaction ID wrap  (Rod Taylor <pg@rbt.ca>)
List pgsql-hackers
Rod Taylor wrote:

> With one potential snafu -- it blocks new SELECTs against the parent
> table while truncate runs on the child (happens with constraint
> exclusion as well).
> 
> If your transactions are short then it won't be an issue. If you have
> mixed length transactions (many short which the occasional long select)
> then it becomes tricky since those short transactions will be blocked.

One idea is to try to acquire the lock before issuing the TRUNCATE
itself.  If the LOCK TABLE times out, you know you should wait for a
long-running transaction ...


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


pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: How to avoid transaction ID wrap
Next
From: Martijn van Oosterhout
Date:
Subject: Re: adding new field