Thread: Side effect of synchronous_commit = off

Side effect of synchronous_commit = off

From
Yan Cheng CHEOK
Date:
I was wondering whether setting synchronous_commit = off will have the following side effect.

(1) Process A issues UPDATE command on row x, from false to true.
(2) After that, Process B READ from row x.

Is it possible that when Process B start to read row x, the "true" value is not being "flushed" to the table. Hence,
processB will read the row x as false? 

If this situation will happen, is it possible that Process B may issues a command, use to "flush all" pending data to
bewritten to disk? 

Thanks and Regards
Yan Cheng CHEOK





Re: Side effect of synchronous_commit = off

From
Guillaume Lelarge
Date:
Le 25/03/2010 08:49, Yan Cheng CHEOK a écrit :
> I was wondering whether setting synchronous_commit = off will have the following side effect.
>
> (1) Process A issues UPDATE command on row x, from false to true.
> (2) After that, Process B READ from row x.
>
> Is it possible that when Process B start to read row x, the "true" value is not being "flushed" to the table. Hence,
processB will read the row x as false? 
>

No, it's not possible.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Side effect of synchronous_commit = off

From
Arthur Turrini
Date:
Being asynchronous, means that write-to-disk will be queued in kernel for later execution, ie, postgresql won't wait for its write confirmation, but they will occurr in a serial manner.


On Thu, Mar 25, 2010 at 4:49 AM, Yan Cheng CHEOK <yccheok@yahoo.com> wrote:
I was wondering whether setting synchronous_commit = off will have the following side effect.

(1) Process A issues UPDATE command on row x, from false to true.
(2) After that, Process B READ from row x.

Is it possible that when Process B start to read row x, the "true" value is not being "flushed" to the table. Hence, process B will read the row x as false?

If this situation will happen, is it possible that Process B may issues a command, use to "flush all" pending data to be written to disk?

Thanks and Regards
Yan Cheng CHEOK





--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general