Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TSHUZ-0001M9-WA for pgsql-docs@postgresql.org; Sun, 28 Oct 2012 01:16:44 +0000 Received: from mail-ia0-f174.google.com ([209.85.210.174]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TSHUT-0003xQ-2H for pgsql-docs@postgresql.org; Sun, 28 Oct 2012 01:16:42 +0000 Received: by mail-ia0-f174.google.com with SMTP id y32so3089813iag.19 for ; Sat, 27 Oct 2012 18:16:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :x-gm-message-state; bh=yXDO9fPSW529vq4kdvit2nfQ4U0G9u95DQuFOG3bSeU=; b=FSdr6uwDCAQ/cBpwaPicb+/QV6KkGhYkQPaFX8/dPcxOeIedoNyyMU9GPciruCJU9q RLe6PG0F8Vsvn8taGu+vDdSuCNzMQi9X/ouSpiNlhMtd412ObgMOl4L1H5h0yOD1gBRP HysnJyKbB40KDfPkuqcq9eRomG13bZ3j1RH4pSmWHN68ldxi2w+VcuZ/+Ma0rg6IM8M1 vBt1LSs2u7RAZvZiA6T4n3K6ao3LNNfK9tVu9nRfxEIakLA4yFbMrhTlhtQTQmiJAD5E /z34ptGcYHQYGG1gaES1H0yyNQTaDFnR7D0qqPTG2iml8/srdgVtIOJFsv6UUN353Vjb x1Gw== MIME-Version: 1.0 Received: by 10.50.179.97 with SMTP id df1mr6051153igc.2.1351386994914; Sat, 27 Oct 2012 18:16:34 -0700 (PDT) Received: by 10.64.176.233 with HTTP; Sat, 27 Oct 2012 18:16:34 -0700 (PDT) In-Reply-To: References: Date: Sat, 27 Oct 2012 18:16:34 -0700 X-Google-Sender-Auth: bzZ0jBkL6NVcJjR6ZypB6eJhP78 Message-ID: Subject: Manual Entries of commit_delay and commit_siblings are not complete. From: Tianyin Xu To: pgsql-docs@postgresql.org Content-Type: multipart/alternative; boundary=14dae934044dc9349304cd144d46 X-Gm-Message-State: ALoCoQk2o08BEEicxz7nG5XDZrGRULuTLf97KASychsTtbxsaReMZ/BcMrdJdHe0Hj/3V5dQ4Es/ X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201210/12 X-Sequence-Number: 7492 --14dae934044dc9349304cd144d46 Content-Type: text/plain; charset=ISO-8859-1 Hi, pgsql-docs, I was confused by the system behavior of PG's write ahead log, specifically the relation between commit_delay, commit_siblings, and fsync. Basically according to the manual ( http://www.postgresql.org/docs/9.1/static/runtime-config-wal.html), I know: "commit_delay" specifies the delay before a transaction attempts to flush the WAL buffer out to disk. "commit_siblings" specifies minimum number of concurrent open transactions to require before performing the commit_delay delay. However, after looking at the code, I figured out these configuration parameters are also controlled by fsync. The only usage of the two parameter I can find is: /* src/backend/access/transam/xact.c */ static TransactionId RecordTransactionCommit(void) ... if (CommitDelay > 0 && enableFsync && MinimumActiveBackends(CommitSiblings)) pg_usleep(CommitDelay); ... } where, CommitDelay stores the parameter of "commit_delay", CommitSiblings stores the parameter of "commit_siblings", and enableFsync stores the parameter of "fsync". It seems the two parameters (commit_delay and commit_siblings) only have effect when fsync is set to be *on*. But, unfortunately, such behavior is not covered in the manual. The mistake I made is only set the two values but disabling fsync so the expected PG does not behave as I expected. I think it's definitely helpful to specify the relations between these configuration parameters either in the manual, or in the source code by giving warnings logs. Thanks a lot! Tianyin --14dae934044dc9349304cd144d46 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi, pgsql-docs,

I was confuse= d by the system behavior of PG's write ahead log, specifically the rela= tion between=A0commit_delay,=A0commit_siblings, and=A0fsync.

Basically according to the manual (http://www.postgresql.org/docs/9.1/static/runtime-config-wal.html), I = know:

"commit_delay" specifies=A0th= e delay before a transaction attempts to flush the WAL buffer out to disk.<= /span>
&= quot;commit_siblings"=A0specifies m<= span style=3D"line-height:18px;text-align:left;font-size:12px;font-family:v= erdana,sans-serif">inimum number of concurrent open transactions to require= before performing the=A0commit_delay=A0delay.

However, after looking at the= code, I figured out these configuration parameters are also controlled by= =A0fsync.

The= only usage of the two parameter I can find is:

/*=A0src/backend/access/t= ransam/xact.c=A0*/

static TransactionId
RecordTransactionCommit(void)
= =A0 =A0 =A0...
=A0 =A0 =A0if= (CommitDelay > 0 &&=A0
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 enableFsync &&
= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MinimumActiveBackends(CommitSiblings))<= /div>
=A0 =A0 =A0 =A0 =A0 =A0 pg_usleep(CommitDelay);

=A0 =A0 ...
}

where, CommitDelay stores the parameter = of "commit_delay<= /span>", CommitSiblings stores the parameter of "commit_siblings", and=A0en= ableFsync=A0stores the parameter of "fsync".

It = seems the two parameters (commit_delay=A0and=A0commit_siblings) only have effect when=A0fsync=A0is set to be *on*.

But= , unfortunately, such behavior is not covered in the manual. The mistake I = made is only set the two values but disabling=A0fsync=A0so the expected PG does not behave= as I expected. I think it's definitely helpful to specify the relation= s between these configuration parameters either in the manual, or in the so= urce code by giving warnings logs.

Tha= nks a lot!
Tianyin
--14dae934044dc9349304cd144d46--