Re: reducing statistics write overhead

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: reducing statistics write overhead
Дата
Msg-id 20080906223037.GC4051@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: reducing statistics write overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: reducing statistics write overhead
Список pgsql-hackers
Tom Lane escribió:
> Alvaro Herrera <alvherre@commandprompt.com> writes:

> > - Maybe we oughta have separate files, one for each database?  That way
> > we'd reduce unnecessary I/O traffic for both the reader and the writer.
> 
> The signaling would become way too complex, I think.  Also what do you
> do about shared tables?

They are already stored in a "separate database" (denoted with
InvalidOid dbid), and autovacuum grabs it separately.  I admit I don't
know what do regular backends do about it.

As for signalling, maybe we could implement something like we do for the
postmaster signal stuff: the requestor stores a dbid in shared memory
and sends a SIGUSR2 to pgstat or some such.  We'd have enough shmem
space for a reasonable number of requests, and pgstat consumes them from
there into local memory (similar to what Andrew proposes for
LISTEN/NOTIFY); it stores the dbid and PID of the requestor.  As soon as
the request has been fulfilled, pgstat responds by <fill in magical
mechanism that Martin is about to propose> to that particular backend.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCH] "\ef " in psql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] "\ef " in psql