On Tue, Dec 14, 2010 at 11:47 AM, Alvaro Herrera <alvhe...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers