Re: Synchronous replication and read consistency

Поиск
Список
Период
Сортировка
От Ravi Krishna
Тема Re: Synchronous replication and read consistency
Дата
Msg-id CACER=P3e8o=nEq7_4jmwMaaY=MEABJWr1jUeMVwVXowx2=OSjQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Synchronous replication and read consistency  (Chris Mair <chris@1006.org>)
Ответы Re: Synchronous replication and read consistency  (Chris Mair <chris@1006.org>)
Re: Synchronous replication and read consistency  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-general
Chris/Joshua

I would like to know more details.

As per this:

http://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION

"When requesting synchronous replication, each commit of a write
transaction will wait until confirmation is received that the commit
has been written to the transaction log on disk of both the primary
and standby server."

Does it mean that, on the standby, when PG writes the transaction log
on the disk, it also updates the data buffers to make the transaction
visible for all sessions.

Eg:

  On the primary
     A big transaction committed
  Now if I issue a select on the primary looking for the transaction I
committed above, I will get what I want.
Will I get the same result if instead of primary I issue the select on
the standby.

Hope it is clear.



On Wed, Jul 29, 2015 at 2:20 PM, Chris Mair <chris@1006.org> wrote:
>> Does sync replication guarantee that any inserted data on primary is
>> immediately visible for read on standbys with no lag.
>
> Basically yes. Of course there is *some* latency, at the very least
> from the network.
>
> If I run a process on a standby machine that displays a value every
> 0.1 sec and update the value on the master, I see the standby updating
> with a lag that feels less than 0.2 sec or so.
>
> You might have lag, however, in situations where you have so much
> write into the master that the network or standby is not able to
> catch up. After the write burst is over, the stanby will catch up
> as it quickly as possible, though.
>
> Also, you use the word "consistency", that would be something else...
> Of course you always get consistent data, lag or not. This is Postgres
> after all :)
>
> Bye,
> Chris.
>
>
>
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: instr detail
Следующее
От: CS DBA
Дата:
Сообщение: xmin horizon?