[GENERAL] Synchronous Commit, WAL archiving and statement_timeout

Поиск
Список
Период
Сортировка
От JP Jacoupy
Тема [GENERAL] Synchronous Commit, WAL archiving and statement_timeout
Дата
Msg-id Sunq8Sm-AZC17UDIQPCztPHCbbrEmmT3RNmYGCq0h-uS6cKnQkEBegqdqbr9fPZnEa66ZO3ZTJeA01FTbEEklwqYqt_A1HAOB0Q4GUQcdr0=@protonmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Synchronous Commit, WAL archiving and statement_timeout  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: [GENERAL] Synchronous Commit, WAL archiving and statement_timeout  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general

Hello,

I noticed something strange and I would like to understand what's happening.

I have the following environment:
  - 2 PostgreSQL instance running in hot-standby with synchronous commit activated.
    (further called Master & Slave)
  - The archiving of the WAL files is activated on the master running every 5 minutes
  - Slave is down

I set the statement_timeout inside my ~/.psqlrc:
$ cat ~/.psqlrc
set statement_timeout = 1;
commit;

When running an UPDATE statement (via psql) on the master, it hangs (psql seems to
wait a response from the slave) ignoring any value I set in my .psqlrc and the update is
done and written on the Master. Furthermore if I try (doing the same things in a small
script with a timeout on the call to PQexec) to make a call to PQcancel it does nothing
on the Master.

I expected the statement to timeout because the synchronous_commit wouldn't work
since the Slave is down while rollbacking on the Master.

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: [GENERAL] (solved) R: Very strange problem on index
Следующее
От: John R Pierce
Дата:
Сообщение: Re: [SPAM] [GENERAL] AD(Active Directory) groups concepts in postgres