Search Postgresql Archives

set statement_timeout does not work

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

 



Hi,

I try to set the statement_timeout so that "select pg_stop_backup();"
will not hang if archive command failed. Below are the command and
errors.

psql.exe" -d mydb -h myhost -p 5432 -U postgres -w -c "set
statement_timeout = 1000; select pg_stop_backup();"
WARNING:  pg_stop_backup still waiting for archive to complete (60
seconds elapsed)
WARNING:  pg_stop_backup still waiting for archive to complete (120
seconds elapsed)
WARNING:  pg_stop_backup still waiting for archive to complete (240
seconds elapsed)
WARNING:  pg_stop_backup still waiting for archive to complete (480
seconds elapsed)


I also tried to run the two commands seperately as below. It also does not work.

psql.exe" -d mydb -h myhost -p 5432 -U postgres -w -c "set
statement_timeout = 1000;"
psql.exe" -d mydb -h myhost -p 5432 -U postgres -w -c "select pg_stop_backup();"

If I change the "statement_timeout" setting of postgresql.conf, it
works. But it will afftect all the queries.

How to use psql to do it?

Thanks.

Jack

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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