invisible commit question for sync replication

Поиск
Список
Период
Сортировка
От qihua wu
Тема invisible commit question for sync replication
Дата
Msg-id CAPoYtoLLjg1rPLNsPoF5E4dAPgGaMnBEpxP-yW8xjgGkm1q16w@mail.gmail.com
обсуждение исходный текст
Ответы Re: invisible commit question for sync replication  (Julien Rouhaud <rjuju123@gmail.com>)
Re: invisible commit question for sync replication  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
When run a cluster with sync replication, if DML is done on primary, but primary is isolated from all slave, then the DML will hang, if cancel it DML, it will say:
WARNING:  canceling wait for synchronous replication due to user request
DETAIL:  The transaction has already committed locally, but might not have been replicated to the standby

So the workflow is
1: commit to local.
2: waiting for ACK from remote sync.

When cancel the DML at step 2. the data are arealy on local, that's why it's warning.

But when runs an insert which is waiting for remote ACK, and then query from another session, I didn't find that row. Why this happen? If the insert is already one locally, whey another session can't read it?

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

Предыдущее
От: Brent Wood
Дата:
Сообщение: Re: Best Open Source OS for Postgresql
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: invisible commit question for sync replication