From: | Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Analyze using savepoints? |
Date: | 2004-08-09 13:01:26 |
Message-ID: | 20040809130125.GA19105@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Aug 09, 2004 at 04:44:58PM +0800, Christopher Kings-Lynne wrote:
> I read this in the release notes:
>
> ---
> # Database-wide ANALYZE does not hold locks across tables (Tom)
>
> This reduces the potential for deadlocks against other backends that
> want exclusive locks on tables. To get the benefit of this change, do
> not execute database-wide ANALYZE inside a transaction block (BEGIN
> block); it must be able to commit and start a new transaction for each
> table.
> ---
>
> Does that mean that now if we used savepoints internally, analyze can
> still be run in a transaction and still not hold lots of locks?
No, because savepoints do not release locks on successful completion, only
on rollback.
I think both VACUUM and ANALYZE could be best served by appropiate use
of short-lived ResourceOwners. It needs some thought though.
--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"El realista sabe lo que quiere; el idealista quiere lo que sabe" (Anónimo)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-08-09 14:13:25 | Re: 8.0.0beta1 ... packaged for testing ... |
Previous Message | Scott Marlowe | 2004-08-09 13:01:16 | Re: VACUUM DELAY |