pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Simplify backend terminate and wait logic in postgres_fdw test
Date: Mon, 12 Apr 2021 14:48:08 +0900
Message-ID: <YHPfGHPxswlsckYA@paquier.xyz> (raw)
In-Reply-To: <CALj2ACV4qtU1m5ip++DQdDrgczTqgxqSN5xAQB42o02YhTD_ug@mail.gmail.com>
References: <CALj2ACXGY_EfGrMTjKjHy2zi-u1u9rdeioU_fro0T6Jo8t56KQ@mail.gmail.com>
	<YG7v8uSVOpwvDz/v@paquier.xyz>
	<CALj2ACWSa51R69mCp1_r0CeyKNQ=qU4OWn=U5wjhpXGuMeEbBQ@mail.gmail.com>
	<CALj2ACV4qtU1m5ip++DQdDrgczTqgxqSN5xAQB42o02YhTD_ug@mail.gmail.com>

On Fri, Apr 09, 2021 at 04:53:01PM +0530, Bharath Rupireddy wrote:
> I feel that we can provide a high timeout value (It can be 1hr on the
> similar lines of using pg_sleep(3600) for crash tests in
> 013_crash_restart.pl with the assumption that the backend running that
> command will get killed with SIGQUIT) and make pg_terminate_backend
> wait. This unreasonably high timeout looks okay because of the
> assumption that the servers in the build farm will not take that much
> time to remove the backend from the system processes, so the function
> will return much earlier than that. If at all there's a server(which
> is impractical IMO) that doesn't remove the backend process even
> within 1hr, then that is anyways will fail with the warning.

You may not need a value as large as 1h for that :)
 
Looking at the TAP tests, some areas have been living with timeouts of
up to 180s.  It is a matter of balance here, a timeout too long would
be annoying as it would make the detection of a problem longer for
machines that are stuck, and a too short value generates false
positives.  5 minutes gives some balance, but there is really no
perfect value.

> With the attached patch, we could remove the procedure
> terminate_backend_and_wait altogether. Thoughts?

That's clearly better, and logically it would work.  As those tests
are new in 14, it may be a good idea to cleanup all that so as all the
branches have the same set of tests.  Would people object to that?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (21+ messages)  latest in thread

Message-ID: <YHPfGHPxswlsckYA@paquier.xyz>
Permalink:  ../YHPfGHPxswlsckYA@paquier.xyz/
Also on:    postgresql.org/message-id/YHPfGHPxswlsckYA@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, bharath.rupireddyforpostgres@gmail.com
  Subject: Re: Simplify backend terminate and wait logic in postgres_fdw test
  In-Reply-To: <YHPfGHPxswlsckYA@paquier.xyz>
  References: <CALj2ACXGY_EfGrMTjKjHy2zi-u1u9rdeioU_fro0T6Jo8t56KQ@mail.gmail.com> <YG7v8uSVOpwvDz/v@paquier.xyz> <CALj2ACWSa51R69mCp1_r0CeyKNQ=qU4OWn=U5wjhpXGuMeEbBQ@mail.gmail.com> <CALj2ACV4qtU1m5ip++DQdDrgczTqgxqSN5xAQB42o02YhTD_ug@mail.gmail.com> <YHPfGHPxswlsckYA@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox