Re: Data Corruption in case of abrupt failure - Mailing list pgsql-general

From Tom Lane
Subject Re: Data Corruption in case of abrupt failure
Date
Msg-id 25740.1079541691@sss.pgh.pa.us
Whole thread Raw
In response to Re: Data Corruption in case of abrupt failure  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-general
"scott.marlowe" <scott.marlowe@ihs.com> writes:
> On Tue, 16 Mar 2004, Tom Lane wrote:
>> What I'd suggest is to set up a simple test involving a long string of
>> very small transactions (a bunch of separate INSERTs into a table with
>> no indexes works fine).  Time it twice, once with "fsync" enabled and
>> once without.  If there's not a huge difference, your drive is lying.

> pgbench is a nice candidate for this.
> pgbench -c 100 -t 100000

I wouldn't do that, first because pgbench transactions are relatively
large (several updates per xact IIRC), and second because you'll be
measuring contention effects as well as pure WAL write activity.
If you simply must use pgbench for this, use -c 1 ... but it's surely
easy enough to make a file of a few thousand copies of
    INSERT INTO foo VALUES(1);
and feed it to psql.

            regards, tom lane


pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Data Corruption in case of abrupt failure
Next
From: Francisco Reyes
Date:
Subject: Check constraint