Re: AutoVacuum starvation from sinval messages

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: AutoVacuum starvation from sinval messages
Дата
Msg-id 20121109150820.GA12633@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: AutoVacuum starvation from sinval messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: AutoVacuum starvation from sinval messages  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Tom Lane escribió:
> Robert Haas <robertmhaas@gmail.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: TRUNCATE SERIALIZABLE and frozen COPY
Следующее
От: Robert Haas
Дата:
Сообщение: Re: AutoVacuum starvation from sinval messages