From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Autovacuum improvements |
Date: | 2007-01-15 18:12:39 |
Message-ID: | 20070115181239.GQ7233@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Also see Peter's nearby suggestion that we ought to wait instead of fail
> for *all* cases of somebody attached to the database. This would adapt
> readily enough to that.
>
> I was complaining elsewhere that I didn't want to use a sleep loop
> for fixing the fsync-synchronization issue, but CREATE/DROP DATABASE
> seems a much heavier-weight operation, so I don't feel that a sleep
> is inappropriate here.
Note that currently there's no way for a backend to know whether another
backend is autovacuum or not. I thought about adding a flag to PGPROC,
but eventually considered it ugly, so I started coding it as a shared
memory area instead, similar to what the bgwriter uses (storing the PID
there, etc). After that was almost done I noticed that it's not a very
good idea either because there's no way to clean the shmem if autovacuum
dies -- the only one who knows about it, postmaster, does not want to
have access to shmem, so it can't do it.
So I'm reverting to using the flag in PGPROC for now, with an eye
towards using shmem eventually if we decide that using an always-running
autovacuum launcher is a good idea.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-15 18:21:21 | Re: [HACKERS] Checkpoint request failed on version 8.2.1. |
Previous Message | Florian G. Pflug | 2007-01-15 18:07:35 | Re: xml type and encodings |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-15 18:23:39 | Re: Autovacuum improvements |
Previous Message | Magnus Hagander | 2007-01-15 18:05:28 | Re: O_DIRECT support for Windows |