Re: BUG #17537: Dynamically updating statement_timeout not affect the insert query right now. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17537: Dynamically updating statement_timeout not affect the insert query right now.
Date
Msg-id 1216663.1656860480@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17537: Dynamically updating statement_timeout not affect the insert query right now.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> However, dynamically updating statement_timeout did not affect the insert
> query right now.
> I start up Postgres with statement_timeout set 0, which means disabling the
> timeout. Then I insert 100000000 rows into a table, which finally takes
> 166498.487ms. During the insert operation, I consider the operation would
> takes too much time. So I update statement_timeout to 10s in
> postgresql.conf, and "select pg_reload_conf();" in another session to reload
> configuration files.

This is not a bug.  Active sessions absorb new values from postgresql.conf
only when idle, not instantaneously mid-query (and I'm pretty sure that is
documented, though I'm too lazy to search the docs right now).  I think
trying to do the latter would break far more scenarios than it would
improve.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17538: Dynamically updating log_hostname not affect the disconnection log
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #17537: Dynamically updating statement_timeout not affect the insert query right now.