Lists: | pgsql-hackers |
---|
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | HOT and autovacuum |
Date: | 2008-03-03 21:03:48 |
Message-ID: | 20080303210348.GA7321@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
I'm seeing a 8.3 database whose autovacuum-initiated vacuums are being
cancelled and I am not sure of the cause. I am wondering if a HOT
cleanup round on a page could try to acquire locks on it that would
conflict with autovacuum (basically anything that conflicts with a
vacuum lock). This would cause autovacuum to commit hara-kiri.
If the table is frequently updated and HOT is invoked often, this could
be very frequent. The auto-cancel feature of autovacuum is IMHO, in
this case, not welcome. Perhaps we could teach autovac to not cancel
itself if the other locker is a HOT page prune?
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: HOT and autovacuum |
Date: | 2008-03-03 22:47:22 |
Message-ID: | 1468.1204584442@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> I'm seeing a 8.3 database whose autovacuum-initiated vacuums are being
> cancelled and I am not sure of the cause. I am wondering if a HOT
> cleanup round on a page could try to acquire locks on it that would
> conflict with autovacuum (basically anything that conflicts with a
> vacuum lock). This would cause autovacuum to commit hara-kiri.
This is nonsense, no? A buffer cleanup lock is an LWLock not a lock
manager lock.
regards, tom lane
From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: HOT and autovacuum |
Date: | 2008-03-04 11:20:44 |
Message-ID: | 20080304112044.GA4755@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > I'm seeing a 8.3 database whose autovacuum-initiated vacuums are being
> > cancelled and I am not sure of the cause. I am wondering if a HOT
> > cleanup round on a page could try to acquire locks on it that would
> > conflict with autovacuum (basically anything that conflicts with a
> > vacuum lock). This would cause autovacuum to commit hara-kiri.
>
> This is nonsense, no? A buffer cleanup lock is an LWLock not a lock
> manager lock.
Yeah, I realized that after awhile. There must be something else they
are doing.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support