Re: Instrument checkpoint sync calls - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Instrument checkpoint sync calls
Date
Msg-id AANLkTikWDQcr4MWU0zJbTjW_hoiiWAKNhYRu9APWT21z@mail.gmail.com
Whole thread Raw
In response to Re: Instrument checkpoint sync calls  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_execute_from_file, patch v10
Next
From: Tom Lane
Date:
Subject: Re: ALTER TABLE ... REPLACE WITH