Checkpointer vs pg_stat_bgwriter

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Checkpointer vs pg_stat_bgwriter
Date: 2012-02-26 19:24:08
Message-ID: CABUevEwyxHgFT=-J5udV0gTsS-B7cHtiaTF1ipFE83Q8oogkcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

I admit to not having actually tested this since I don't have a good
cluster to test it on right now, but from what I can tell the code in
the new checkpointer process only sends statistics to the collector
once the checkpoint is finished (checkpointer.c, line 549). The 9.1
and earlier sent this every time they entered a delay state (in
BgWriterNap() called from CheckpointWriteDelay()).

So in 9.1 and earlier we could see how a checkpoint wrote things as it
was running, but in 9.2 we'll get it all as one big block at the end
of the checkpoint - which can be a lot later in the spread case.

Am I reading the code right?

And if so, was this an intentional change, and if so why? To me it
seems like a loss of functionality that should be fixed..

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2012-02-26 19:49:12 Re: Command Triggers, patch v11
Previous Message Heikki Linnakangas 2012-02-26 19:16:46 Re: COPY with hints, rebirth