From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Rod Taylor <pg(at)rbt(dot)ca> |
Cc: | Christopher Browne <cbbrowne(at)acm(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: How to avoid transaction ID wrap |
Date: | 2006-06-06 18:47:58 |
Message-ID: | 20060606184758.GE2263@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-06-06 18:52:42 | Re: adding new field |
Previous Message | Rod Taylor | 2006-06-06 18:15:24 | Re: How to avoid transaction ID wrap |