Re: synchronous_commit and wal_writer_delay - Mailing list pgsql-admin

From Jaime Casanova
Subject Re: synchronous_commit and wal_writer_delay
Date
Msg-id CAJKUy5gQ6ub0+FmTgRtim30fb38AcqbpqfjUdZY4dZ2C=YtiwQ@mail.gmail.com
Whole thread Raw
In response to synchronous_commit and wal_writer_delay  (A J <s5aly@yahoo.com>)
List pgsql-admin
On Tue, Jul 26, 2011 at 1:39 PM, A J <s5aly@yahoo.com> wrote:
> Does a synchronous_commit force WAL to be committed to disk or does it just
> WAIT for WAL to be committed according to WAL's set frequency to write ?
> i.e. if I set wal_writer_delay=200ms and set synchronous_commit=on, will
> each commit wait for upto 200ms before committing ?
>

no, that is synchronous...

if you set wal_writer_delay=200ms and set synchronous_commit=off then
the commit will not be wal-safe (meaning it won't resist a server
crash and you will lose data) for a short period of time (200ms in
this example)

but you shouldn't be setting synchronous_commit on postgresql.conf
normally but from the application

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación

pgsql-admin by date:

Previous
From: A J
Date:
Subject: synchronous_commit and wal_writer_delay
Next
From: Greg Smith
Date:
Subject: Re: replication_timeout does not seem to be working