Re: Read consistency when using synchronous_commit=off

2019-01-16 Thread Ron
A crash-unsafe database is for data you don't care about. On 1/16/19 2:27 AM, pshadangi wrote: Thanks Ravi for the clarification, we will go ahead with "synchronous_commit=off". On Wed, Jan 16, 2019 at 10:47 AM Ravi Krishna > wrote: Sorry I misunderstood.

Re: Read consistency when using synchronous_commit=off

2019-01-16 Thread pshadangi
Thanks Ravi for the clarification, we will go ahead with "synchronous_commit=off". On Wed, Jan 16, 2019 at 10:47 AM Ravi Krishna wrote: > Sorry I misunderstood. The term "read consistency" is generally used > either in the context of isolation level or in the context of slaves. > > We don't hav

Re: Read consistency when using synchronous_commit=off

2019-01-15 Thread Ravi Krishna
Sorry I misunderstood. The term "read consistency" is generally used either in the context of isolation level or in the context of slaves. > We don't have standby instance, as I have mentioned we are using just > one instance of postgres serving local clients running on the same > machine, do you

Re: Read consistency when using synchronous_commit=off

2019-01-15 Thread pshadangi
> After better thinking, I have to reply to myself since I m not entirely sure of my previous question. (I m digging into the docs, but i do not want to mislead you in the meanwhile) Yes, I was not able to get some statement regarding this in the docs, please let me know if you find something. Tha

Re: Read consistency when using synchronous_commit=off

2019-01-15 Thread Ravi Krishna
> I m not sure other clients are able to read from WAL buffer, therefore > i m not sure the data is available to other clients at that specific > point in time. No. On the standby the buffer cache has to be populated with the updates before other client sessions can read it. AFAIK other client s

Re: Read consistency when using synchronous_commit=off

2019-01-15 Thread Fabio Pardi
Hi, After better thinking, I have to reply to myself since I m not entirely sure of my previous question. (I m digging into the docs, but i do not want to mislead you in the meanwhile) If i recall correctly, written data is parked in WAL buffer before being synced to disk (to the transaction l

Re: Read consistency when using synchronous_commit=off

2019-01-15 Thread Fabio Pardi
Hi, all clients will get the latest version of the row (from RAM, that is). The only thing is that in case of server crash, not-yet-written-to-disk commits will be lost. detailed explanation can be found here: https://www.postgresql.org/docs/current/wal-async-commit.html regards, fabio pardi