X-Original-To: pgsql-hackers-pitr-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 268D9D1B8E4; Wed, 3 Mar 2004 23:47:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 40058-01; Wed, 3 Mar 2004 19:47:48 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id BA95DD1C9EF; Wed, 3 Mar 2004 19:47:39 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i23NkN1f019295; Wed, 3 Mar 2004 18:46:23 -0500 (EST) To: simon@2ndquadrant.com Cc: "'Neil Conway'" , josh@agliodbs.com, "'Rob Fielding'" , pgsql-performance@postgresql.org, pgsql-hackers-pitr@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] [PERFORM] WAL Optimisation - configuration and usage In-reply-to: <006801c40168$1db208d0$5baa87d9@LaptopDellXP> References: <006801c40168$1db208d0$5baa87d9@LaptopDellXP> Comments: In-reply-to "Simon Riggs" message dated "Wed, 03 Mar 2004 21:40:09 +0000" Date: Wed, 03 Mar 2004 18:46:23 -0500 Message-ID: <19294.1078357583@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/2 X-Sequence-Number: 26 "Simon Riggs" writes: > 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 I see no value in reverting Neil's change. The above looks way too much like old-line assembler-programmer thinking to me, anyway. Why not invent a separate, appropriately named boolean variable for each thing you want to control? Even C programmers manage to avoid doing the sort of mental arithmetic that the above would force onto DBAs. As for whether it should be #ifdef'd or not, I'd have no objection to turning WAL_DEBUG on by default in pg_config_manual.h for the duration of PITR development. One should not however confuse short-term debugging needs with features that the average user is going to need indefinitely. (It was not too long ago that there was still debugging code for btree index building in there, for crissakes.) regards, tom lane