Re: Instrument checkpoint sync calls

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Instrument checkpoint sync calls
Дата
Msg-id AANLkTikWDQcr4MWU0zJbTjW_hoiiWAKNhYRu9APWT21z@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Instrument checkpoint sync calls  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Tue, Dec 14, 2010 at 11:47 AM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
>> > that I'm
>> > uncomfortable with the idea of mdsync filling in the details for
>> > CheckpointStats fields directly.  Would it work to pass a struct (say
>> > SmgrSyncStats) from CheckPointBuffers to smgrsync and from there to
>> > mdsync, have this function fill it, and return it back so that
>> > CheckPointBuffers copies the data from this struct into CheckpointStats?
>
> But referring to CheckpointStats in md.c seems to me to be a violation
> of modularity that ought to be fixed.

Hmm.  I guess I can't get worked up about it.  We could do what you
propose, but I'm not sure what purpose it would serve.  It's not as if
mdsync() can possibly serve any other purpose other than to be the
guts of a checkpoint.  It seems to me that if we really wanted to get
this disentangled from the checkpoint stats stuff we'd also need to
think about moving that elog(DEBUG1) I added out of the function
somehow, but I think that would just be a lot of notional complexity
for no particular benefit.

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


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pg_execute_from_file, patch v10
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER TABLE ... REPLACE WITH