X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 96874D1D9E6 for ; Tue, 10 Feb 2004 16:41:55 +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 67379-06 for ; Tue, 10 Feb 2004 12:41:38 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 5AC54D1DCAC for ; Tue, 10 Feb 2004 12:41:36 -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 i1AGfXi8015925; Tue, 10 Feb 2004 11:41:34 -0500 (EST) To: "scott.marlowe" Cc: "Goulet, Dick" , pgsql-admin@postgresql.org Subject: Re: hanging for 30sec when checkpointing In-reply-to: References: Comments: In-reply-to "scott.marlowe" message dated "Tue, 10 Feb 2004 09:12:40 -0700" Date: Tue, 10 Feb 2004 11:41:33 -0500 Message-ID: <15924.1076431293@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/137 X-Sequence-Number: 12311 "scott.marlowe" writes: >> Unfortunately not --- at checkpoint time, the constraint goes the other >> way. We have to be sure all the data file updates are down to disk >> before we write a checkpoint record to the WAL log. So you can still >> get screwed if the data-file drive lies about write completion. > Hmmm. OK. Would the transaction size be an issue here? I.e. would small > transactions likely be safer against corruption than large transactions? Transaction size would make no difference AFAICS. Reducing the interval between checkpoints might make things safer in such a case. > I ask because most of the testing I did was with pgbench running 100+ > simos (on a -s 100 pgbench database) and as long as the WAL drive was > fsyncing correctly, the database survived. Did you try pulling the plug immediately after a CHECKPOINT command completes? You could test by manually issuing a CHECKPOINT while pgbench runs, and yanking power as soon as the prompt comes back. regards, tom lane