Search Postgresql Archives

Synchronous Commit, WAL archiving and statement_timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux