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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-hackers-pitr pgsql-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
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moran | 2004-03-03 21:42:34 | Shouldn't B'1' = 1::bit be true? |
Previous Message | Ken Hirsch | 2004-03-03 21:30:37 | Re: [pgsql-hackers-win32] What's left? |
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2004-03-03 23:44:40 | Re: WAL Optimisation - configuration and usage |
Previous Message | Josh Berkus | 2004-03-03 18:58:20 | Re: WAL Optimisation - configuration and usage |
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Kratz | 2004-03-03 21:49:44 | Delete performance on delete from table with inherited tables |
Previous Message | Vivek Khera | 2004-03-03 21:39:37 | Re: Bulk INSERT performance in 7.4.1 |