Re: [GENERAL] Replication and fsync

2013-10-29 Thread Kevin Grittner
Tomas Vondra t...@fuzzy.cz wrote: I think it's safe as long as you don't try to reuse the cluster after a crash (be it due to OS error, power outage, ...). If the primary crashes for any reasons, you have to start from scratch, otherwise there might be silent corruption as you've described.

Re: [GENERAL] Replication and fsync

2013-10-26 Thread Tomas Vondra
Hi, On 24.10.2013 23:18, Alban Hertroys wrote: On Oct 24, 2013, at 18:10, maillis...@gmail.com wrote: Thank you for the answers. I'm still confused. If fsync is not replicated to the slave, then how is replication affected by a corrupt master? If the master dies and there's a commit

Re: [GENERAL] Replication and fsync

2013-10-25 Thread Albe Laurenz
DDT wrote: According to manual, when you set synchronous_commit to on, the transaction commits will wait until master and slave flush the commit record of transaction to the physical storage, so I think even if turn off the fsync on master is safe for data consistency and data will not be

Re: [GENERAL] Replication and fsync

2013-10-24 Thread Fujii Masao
On Thu, Oct 24, 2013 at 10:39 AM, maillis...@gmail.com wrote: Newb question. I'm running 9.1 with a slave using streaming replication. A coworker wants to turn off fsync on the master and insists that the slave will still be in a usable state if there is a failure on the master. We all know

Re: [GENERAL] Replication and fsync

2013-10-24 Thread Alban Hertroys
On 24 October 2013 15:04, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 24, 2013 at 10:39 AM, maillis...@gmail.com wrote: Am I wrong? If I'm wrong, is there still danger to the slave in this kind of setup? No, I think. Corruption due to fsync being off on the master will be

Re: [GENERAL] Replication and fsync

2013-10-24 Thread maillists0
Thank you for the answers. I'm still confused. If fsync is not replicated to the slave, then how is replication affected by a corrupt master? If the master dies and there's a commit recorded in the wal log that didn't actually happen, wouldn't the slave still be expected to be in a sane state,

Re: [GENERAL] Replication and fsync

2013-10-24 Thread Jeff Janes
On Wed, Oct 23, 2013 at 6:39 PM, maillis...@gmail.com wrote: Newb question. I'm running 9.1 with a slave using streaming replication. A coworker wants to turn off fsync on the master and insists that the slave will still be in a usable state if there is a failure on the master. This would

Re: [GENERAL] Replication and fsync

2013-10-24 Thread Alban Hertroys
On Oct 24, 2013, at 18:10, maillis...@gmail.com wrote: Thank you for the answers. I'm still confused. If fsync is not replicated to the slave, then how is replication affected by a corrupt master? If the master dies and there's a commit recorded in the wal log that didn't actually happen,

Re: [GENERAL] Replication and fsync

2013-10-24 Thread DDT
and synchronous_commit http://www.postgresql.org/docs/current/static/wal-intro.html -- Original -- From: maillists0;maillis...@gmail.com; Date: Thu, Oct 24, 2013 09:39 AM To: pgsql-generalpgsql-general@postgresql.org; Subject: [GENERAL] Replication and fsync

[GENERAL] Replication and fsync

2013-10-23 Thread maillists0
Newb question. I'm running 9.1 with a slave using streaming replication. A coworker wants to turn off fsync on the master and insists that the slave will still be in a usable state if there is a failure on the master. We all know that turning off fsync is a bad idea, but I was under the