From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: AutoVacuum starvation from sinval messages |
Date: | 2012-11-09 14:50:36 |
Message-ID: | 10593.1352472636@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> So, do we need a sinval overrun or just a sinval message to provoke
> starvation? The former would be bad but the latter would be really,
> really bad.
The former. Actually, a signal will be sent as soon as a backend is
determined to be unreasonably far behind, which I think is when the
message queue is half full. In the AV launcher case, the queue probably
never actually overflows; but the launcher has to wake up to process
messages every so often, and that wakeup cycle is breaking the timeout
management in WaitLatch.
> IIRC the queue has 4K entries, and IIRC a single DDL
> operation might provoke a couple of sinvals, but I'm thinking that
> somebody would probably have to be creating >1024 temp tables a minute
> to overrun the queue, which is very possible but not necessarily
> common.
Well, one DDL typically generates multiple messages --- one for each
catalog row added/modified/removed, roughly speaking. When I run the
constant create/drop example Jeff posted, I see the AV launcher getting
a catchup signal every few seconds. I didn't try to determine exactly
how many create/drop cycles that was, but I'm pretty sure it's a lot
less than 1000.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Marti Raudsepp | 2012-11-09 14:55:16 | Re: TRUNCATE SERIALIZABLE and frozen COPY |
Previous Message | Kevin Grittner | 2012-11-09 14:43:14 | Re: AutoVacuum starvation from sinval messages |