X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D1757D1C95E for ; Mon, 8 Mar 2004 23:28:37 +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 52170-06 for ; Mon, 8 Mar 2004 19:28:35 -0400 (AST) Received: from cmailg1.svr.pol.co.uk (cmailg1.svr.pol.co.uk [195.92.195.171]) by svr1.postgresql.org (Postfix) with ESMTP id 0D4A1D1D38E for ; Mon, 8 Mar 2004 19:28:32 -0400 (AST) Received: from modem-3571.llama.dialup.pol.co.uk ([217.135.189.243] helo=LaptopDellXP) by cmailg1.svr.pol.co.uk with esmtp (Exim 4.14) id 1B0UAf-0008Jp-F9; Mon, 08 Mar 2004 23:28:29 +0000 Reply-To: From: "Simon Riggs" To: "'Tom Lane'" Cc: "'Neil Conway'" , , Subject: Re: [PERFORM] WAL Optimisation - configuration and usage Date: Mon, 8 Mar 2004 23:28:25 -0000 Organization: 2nd Quadrant Message-ID: <004601c40565$0e848c60$f3bd87d9@LaptopDellXP> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <19294.1078357583@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/296 X-Sequence-Number: 50888 >Tom Lane > "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.) ...erm, I guess you didn't like that one then? ;} > 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. Yes OK, thank you. > Why not > invent a separate, appropriately named boolean variable for each thing > you want to control? Yes, OK, will do. Best Regards, Simon Riggs