Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Infrastructure changes for recovery

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Infrastructure changes for recovery
Date: 2008-09-12 18:14:21
Message-ID: 20080912181421.GI8854@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Simon Riggs wrote:

> --- 5716,5725 ----
>   						CheckpointStats.ckpt_sync_end_t,
>   						&sync_secs, &sync_usecs);
>   
> ! 	elog(LOG, "%s complete: wrote %d buffers (%.1f%%); "
>   		 "%d transaction log file(s) added, %d removed, %d recycled; "
>   		 "write=%ld.%03d s, sync=%ld.%03d s, total=%ld.%03d s",
> + 		 (checkpoint ? "  checkpoint" : "restartpoint"),
>   		 CheckpointStats.ckpt_bufs_written,
>   		 (double) CheckpointStats.ckpt_bufs_written * 100 / NBuffers,
>   		 CheckpointStats.ckpt_segs_added,

Very minor nit: this really needs a rework.  It is relatively OK in the
previous code, but it was already stuffing too much in a single message.
Maybe

ereport(LOG,
(errmsg(checkpoint ? "checkpoint complete" : "restartpoint complete"),
errdetail("Wrote %d buffers (%.1f%%); "
	"%d transaction log file(s) added, %d removed, %d recycled; "
	"write=%ld.%03d s, sync=%ld.%03d s, total=%ld.%03d s.",
	...
)))

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-hackers by date

Next:From: David E. WheelerDate: 2008-09-12 18:21:53
Subject: Re: [Review] Tests citext casts by David Wheeler.
Previous:From: David E. WheelerDate: 2008-09-12 18:14:00
Subject: Re: [Review] Tests citext casts by David Wheeler.

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-09-12 18:56:06
Subject: Re: [HACKERS] Infrastructure changes for recovery
Previous:From: Alex HunsakerDate: 2008-09-12 16:32:57
Subject: Re: hash index improving v3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group