Re: AutoVacuum starvation from sinval messages

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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:13:01
Message-ID: CA+TgmoZVQ4xbYy=gjAaKj6nRGuU+AfatSfLz+Y76q+t6VampZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 9, 2012 at 10:08 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> 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.

Hmm. So, are we going to force a minor release for this, or do we
think it's not serious enough to warrant that?

I'm not expressing an opinion either way, just asking.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-11-09 15:13:35 Re: TRUNCATE SERIALIZABLE and frozen COPY
Previous Message Alvaro Herrera 2012-11-09 15:08:20 Re: AutoVacuum starvation from sinval messages