Re: AutoVacuum starvation from sinval messages

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, 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 15:08:20
Message-ID: 20121109150820.GA12633@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane escribió:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:

> > 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.

Just creating the sequence for the serial column means 16 pg_attribute
tuples. There's also two pg_class entries, one more pg_attribute, two
pg_type entries, a bunch of pg_depend entries ... I doubt it's less than
30 catalog tuples, all things considered. Double that for the drop. So
for a 4k entry table that needs to get 50% full, that's only ~35 temp
table creations like that.

I hadn't realized sequences used so many pg_attribute entries.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-11-09 15:13:01 Re: AutoVacuum starvation from sinval messages
Previous Message Marti Raudsepp 2012-11-09 14:55:16 Re: TRUNCATE SERIALIZABLE and frozen COPY