deadlock_timeout and pg_ctl reload

Started by A.Bhuvaneswaranover 22 years ago4 messagesbugs
Jump to latest
#1A.Bhuvaneswaran
bhuvan@symonds.net

Hi,

I am using pgsql 7.3.2.

If we change the deadlock_timeout value in postgresql.conf and say pg_ctl
reload, the new value is not taken affect. But any other changes like,
datestyle, log_connection, log_pid, etc are taken affect immediately when
we say pg_ctl reload. When we restart the server, the changed
deadlock_timeout value is taken affect.

Example:

1. In 2 psqls, run the deadlock test case. Deadlock is detected in 1sec.
2. Set deadlock_timeout = 15000 and reload the server.
3. Repeat step 1, deadlock is detected again in 1 sec.
4. Restart the server and repeat step 1, deadlock is detected in around
15secs.

regards,
bhuvaneswaran

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: A.Bhuvaneswaran (#1)
Re: deadlock_timeout and pg_ctl reload

On Mon, 21 Jul 2003, A.Bhuvaneswaran wrote:

I am using pgsql 7.3.2.

If we change the deadlock_timeout value in postgresql.conf and say pg_ctl
reload, the new value is not taken affect. But any other changes like,
datestyle, log_connection, log_pid, etc are taken affect immediately when
we say pg_ctl reload. When we restart the server, the changed
deadlock_timeout value is taken affect.

It looks like deadlock_timeout is set PGC_POSTMASTER so it's not
supposed to be reread on SIGHUP (reload) but only on postmaster start.

#3Bruce Momjian
bruce@momjian.us
In reply to: Stephan Szabo (#2)
Re: deadlock_timeout and pg_ctl reload

Stephan Szabo wrote:

On Mon, 21 Jul 2003, A.Bhuvaneswaran wrote:

I am using pgsql 7.3.2.

If we change the deadlock_timeout value in postgresql.conf and say pg_ctl
reload, the new value is not taken affect. But any other changes like,
datestyle, log_connection, log_pid, etc are taken affect immediately when
we say pg_ctl reload. When we restart the server, the changed
deadlock_timeout value is taken affect.

It looks like deadlock_timeout is set PGC_POSTMASTER so it's not
supposed to be reread on SIGHUP (reload) but only on postmaster start.

I think it doesn't reload because we want to have the same timeouts for
all backends, and reload doesn't happen at the same instant for all
backend. A restart would get the new values, or should.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: deadlock_timeout and pg_ctl reload

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Stephan Szabo wrote:

It looks like deadlock_timeout is set PGC_POSTMASTER so it's not
supposed to be reread on SIGHUP (reload) but only on postmaster start.

I think it doesn't reload because we want to have the same timeouts for
all backends, and reload doesn't happen at the same instant for all
backend.

Yeah, I've forgotten the details, but I'm pretty sure we were worried
about race conditions or missed timeouts of some sort if we allowed
deadlock_timeout to change on-the-fly. Try digging in the archives
if you want the whole scoop.

regards, tom lane