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

Re: [PERFORM] WAL Optimisation - configuration and usage

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "'Neil Conway'" <neilc(at)samurai(dot)com>, <josh(at)agliodbs(dot)com>
Cc: "'Rob Fielding'" <rob(at)dsvr(dot)net>,<pgsql-performance(at)postgresql(dot)org>,<pgsql-hackers-pitr(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PERFORM] WAL Optimisation - configuration and usage
Date: 2004-03-03 21:40:09
Message-ID: 006801c40168$1db208d0$5baa87d9@LaptopDellXP (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-pitrpgsql-performance
>Neil Conway
> Simon Riggs wrote:
> >>Josh Berkus wrote
> >>
> >>>Simon Riggs wrote
> >>>Please set WAL_DEBUG to 1 so we can see a bit more info: thanks.
> >>
> >>I'm pretty sure that WAL_DEBUG requires a compile-time option.
> >
> > I'm surprised, but you are right, the manual does SAY this requires
a
> > compile time option; it is unfortunately not correct.
> 
> Actually, the manual is correct: in 7.4 and earlier releases, enabling
> wal_debug can be done without also setting a compile-time #ifdef. As
> of current CVS HEAD, the WAL_DEBUG #ifdef must be defined before this
> variable is available.

Touche! I stand corrected, thank you both. My suggestion does work for
Rob, then.

[This also implies I have a screwed version on my machine, so thank you
also for flushing that lurking issue out for me. I'd had a suspicion for
a few weeks. Lucky I'm still just prototyping.]

On the other hand, I was just about to change the wal_debug behaviour to
allow better debugging of PITR features as they're added. I think it is
very important to be able to put the system fairly easily into debug
mode; a recompile is easy enough, but it would be even better to avoid
this completely. This would mean reversing the change you describe:
here's the design:

The behaviour I wish to add is:
Keep wal_debug as a value between 0 and 16.
If =0 then no debug output (default).
Use following bitmasks against the value
Mask 1 = XLOG Checkpoints get logged
Mask 2 = Archive API calls get logged
Mask 4 = Transaction - commits get logged
Mask 8 = Flush & INSERTs get logged

That way it should be fairly straightforward to control the amount and
type of information available to administrators. The existing design
produces too much info to be easily usable, mostly requiring a perl
program to filter out the info overload and do record counts. This
suggested design allows you to control the volume of messages, since the
bitmasks are arranged in volume/frequency order and brings the wal_debug
option back into something useful for problem diagnosis on live systems,
not just hacking the code.

Anybody object to these mods, or have better/different ideas? Getting
the diagnostics right is fairly important, IMHO, to making PITR become
real.

Best regards, Simon Riggs


In response to

Responses

pgsql-performance by date

Next:From: Chris KratzDate: 2004-03-03 21:49:44
Subject: Delete performance on delete from table with inherited tables
Previous:From: Vivek KheraDate: 2004-03-03 21:39:37
Subject: Re: Bulk INSERT performance in 7.4.1

pgsql-hackers by date

Next:From: Bill MoranDate: 2004-03-03 21:42:34
Subject: Shouldn't B'1' = 1::bit be true?
Previous:From: Ken HirschDate: 2004-03-03 21:30:37
Subject: Re: [pgsql-hackers-win32] What's left?

pgsql-hackers-pitr by date

Next:From: Neil ConwayDate: 2004-03-03 23:44:40
Subject: Re: WAL Optimisation - configuration and usage
Previous:From: Josh BerkusDate: 2004-03-03 18:58:20
Subject: Re: WAL Optimisation - configuration and usage

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