dbTalk Databases Forums  

Re: make "wal_debug" GUC var a boolean

comp.databases.postgresql.patches comp.databases.postgresql.patches


Discuss Re: make "wal_debug" GUC var a boolean in the comp.databases.postgresql.patches forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 12-11-2003 , 06:09 PM






Neil Conway wrote:
Quote:
The "wal_debug" GUC variable was of type "integer", but it was used
in the code effectively as a boolean: the code only tested whether it
was zero or non-zero. This patch makes it a proper boolean.
I agree with this, but would it be possible to fold it into the normal
debug output mechanisms? I don't think debugging WAL is any more
important nowadays than any other component.


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 12-12-2003 , 09:01 AM






Peter Eisentraut <peter_e (AT) gmx (DOT) net> writes:
Quote:
I agree with this, but would it be possible to fold it into the normal
debug output mechanisms? I don't think debugging WAL is any more
important nowadays than any other component.
I agree. Having a special debug variable for WAL seems like a
short-term thing whose time has passed. You could probably even
make that code a compile-time option like the others at the
bottom of pg_config_manual.h.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
  #3  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 12-12-2003 , 01:27 PM



Tom Lane wrote:
Quote:
I agree. Having a special debug variable for WAL seems like a
short-term thing whose time has passed. You could probably even
make that code a compile-time option like the others at the
bottom of pg_config_manual.h.
That seems right. It's never something that a user would need, because
by the time you'd tell him to turn it on, the events won't be
repeatable.

Btw., that list in pg_config_manual.h is totally incomplete and seems
unnecessary because most of these things only affect one file and are
better turned on or off there.


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
  #4  
Old   
Neil Conway
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 12-12-2003 , 03:34 PM



Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> writes:
Quote:
I agree. Having a special debug variable for WAL seems like a
short-term thing whose time has passed.
ISTM that there is little distinguishing wal_debug and the following
GUC vars:

log_btree_build_stats
trace_notify
trace_locks
trace_userlocks
trace_lwlocks
debug_deadlocks
trace_lock_oidmin
trace_lock_table
debug_shared_buffers

Should these be changed as well?

-Neil


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
  #5  
Old   
Tom Lane
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 12-12-2003 , 03:50 PM



Neil Conway <neilc (AT) samurai (DOT) com> writes:
Quote:
ISTM that there is little distinguishing wal_debug and the following
GUC vars:

log_btree_build_stats
trace_notify
trace_locks
trace_userlocks
trace_lwlocks
debug_deadlocks
trace_lock_oidmin
trace_lock_table
debug_shared_buffers

Should these be changed as well?
Well, Jan just put in debug_shared_buffers recently, so I'd assume
that's still a live debugging option.

The others are already #ifdef'd out by default, which is more or
less what I was suggesting you do with the wal_debug code.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
  #6  
Old   
Neil Conway
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 12-12-2003 , 03:57 PM



Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> writes:
Quote:
The others are already #ifdef'd out by default, which is more or
less what I was suggesting you do with the wal_debug code.
(FWIW, trace_notify is not #ifdef'd out.)

But I thought that you (and Peter) were suggesting that this shouldn't
be made a GUC variable at all, just a preprocessor definition.

-Neil


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
  #7  
Old   
Tom Lane
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 12-12-2003 , 04:04 PM



Neil Conway <neilc (AT) samurai (DOT) com> writes:
Quote:
Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> writes:
The others are already #ifdef'd out by default, which is more or
less what I was suggesting you do with the wal_debug code.

(FWIW, trace_notify is not #ifdef'd out.)
My mistake --- if you feel like making it so, go to it.

Quote:
But I thought that you (and Peter) were suggesting that this shouldn't
be made a GUC variable at all, just a preprocessor definition.
I think the combination of #ifdef and GUC variable is appropriate.
Just because you want to debug something doesn't necessarily mean you
want the log messages on full strength every instant, especially for
high-volume messages such as the WAL ones. You might for instance want
to log just one backend's WAL activity.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #8  
Old   
Neil Conway
 
Posts: n/a

Default Re: make "wal_debug" GUC var a boolean - 01-06-2004 , 11:27 AM



Neil Conway <neilc (AT) samurai (DOT) com> writes:
Quote:
Unless anyone objects, I intend to apply this in 24 hours or so.
Patch applied.

-Neil


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.