Re: how unsafe (or worst scenarios) when setting fsync - Mailing list pgsql-performance

From Tom Lane
Subject Re: how unsafe (or worst scenarios) when setting fsync
Date
Msg-id 25360.1146200748@sss.pgh.pa.us
Whole thread Raw
In response to Re: how unsafe (or worst scenarios) when setting fsync  ("Guoping Zhang" <guoping.zhang@nec.com.au>)
List pgsql-performance
"Guoping Zhang" <guoping.zhang@nec.com.au> writes:
> But altering the commit_delay from 1 to 100000, I observed that there is no
> time difference for the operation. Why is that? As our tests consists of
> 10000 small transactions which completed in 66 seconds, that is, about 160
> transactions per second. When commit_delay set to 100000 (i.e., 0.1 second),
> that in theory, shall group around 16 transactions into one commit, but
> result is same from the repeated test. Am I mistaken something here?

commit_delay can only help if there are multiple clients issuing
transactions concurrently, so that there are multiple commits pending at
the same instant.  If you are issuing one serial stream of transactions,
it's useless.

If you do have multiple active clients, then we need to look more closely;
but your statement does not indicate that.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Guoping Zhang"
Date:
Subject: Re: how unsafe (or worst scenarios) when setting fsync
Next
From: "Guoping Zhang"
Date:
Subject: Re: how unsafe (or worst scenarios) when setting fsync OFF for postgresql