Re: Statement timeout in pg_rewind - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Statement timeout in pg_rewind
Date
Msg-id 20190826042754.GB7005@paquier.xyz
Whole thread Raw
In response to Re: Statement timeout in pg_rewind  (David Fetter <david@fetter.org>)
Responses Re: Statement timeout in pg_rewind
List pgsql-hackers
On Sun, Aug 25, 2019 at 10:34:29PM +0200, David Fetter wrote:
> I meant to ask whether, in addition to pg_dump and pg_rewind, there
> are other things that should ignore statement_timeout settings.

Sure.  Please note that I am not sure if it is worth bothering about
all the code paths which emit SQL queries as one thing to consider is
that your query "SET statement_timeout = 0" could be cancelled by the
system's default, defeating its purpose.  (For example, just enforce
statement_timeout = 1 into PostgresNode.pm::init and enjoy the show).
So any tool that we consider worth fixing should be able to act with
timeout values that are realistic.  On top of pg_rewind, there is a
point to raise about src/bin/scripts/ (just enforce the parameters in
common.c), and vacuumlo which creates a temporary table potentially
large.

Alexander, it seems to me that we should also consider lock_timeout
and idle_in_transaction_session_timeout (new as of 9.6), no?  We could
also group the PQexec/PQresultStatus into a simple wrapper which gets
also called by run_simple_query().
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Gareth Palmer
Date:
Subject: Re: [PATCH] Implement INSERT SET syntax
Next
From: Michael Paquier
Date:
Subject: Re: pg_upgrade: Error out on too many command-line arguments