pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Subject: Re: Simplify backend terminate and wait logic in postgres_fdw test
Date: Mon, 03 May 2021 18:42:51 -0400
Message-ID: <3854538.1620081771@sss.pgh.pa.us> (raw)
In-Reply-To: <YHZ+pnpfZYrHL3GU@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>
	<CALj2ACWkpUETxAVDnMzgVafVs-WAPkHgiAQucCNFweOY35RZMQ@mail.gmail.com>
	<YHVKzork+QvH29fX@paquier.xyz>
	<YHZ+pnpfZYrHL3GU@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Apr 13, 2021 at 04:39:58PM +0900, Michael Paquier wrote:
>> Looks fine to me.  Let's wait a bit first to see if Fujii-san has any
>> objections to this cleanup as that's his code originally, from
>> 32a9c0bd.

> And hearing nothing, done.  The tests of postgres_fdw are getting much
> faster for me now, from basically 6s to 4s (actually that's roughly
> 1.8s of gain as pg_wait_until_termination waits at least 100ms,
> twice), so that's a nice gain.

The buildfarm is showing that one of these test queries is not stable
under CLOBBER_CACHE_ALWAYS:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hyrax&dt=2021-05-01%2007%3A44%3A47

of which the relevant part is:

inline patch 1: /home/buildfarm/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/results/postgres_fdw.out (+1/-2 lines) download inline-1.patchdiff -U3 /home/buildfarm/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/expected/postgres_fdw.out /home/buildfarm/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/results/postgres_fdw.out --- /home/buildfarm/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/expected/postgres_fdw.out 2021-05-01 03:44:45.022300613 -0400 +++ /home/buildfarm/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/results/postgres_fdw.out 2021-05-03 09:11:24.051379288 -0400 @@ -9215,8 +9215,7 @@ WHERE application_name = 'fdw_retry_check'; pg_terminate_backend ---------------------- - t -(1 row) +(0 rows) -- This query should detect the broken connection when starting new remote -- transaction, reestablish new connection, and then succeed.
I can reproduce that locally by setting alter system set debug_invalidate_system_caches_always = 1; and running "make installcheck" in contrib/postgres_fdw. (It takes a good long time to run the whole test script though, so you might want to see if running just these few queries is enough.) There's no evidence of distress in the postmaster log, so I suspect this might just be a timing instability, e.g. remote process already gone before local process looks. If so, it's probably hopeless to make this test stable as-is. Perhaps we should just take it out. regards, tom lane

view thread (21+ messages)  latest in thread

Message-ID: <3854538.1620081771@sss.pgh.pa.us>
Permalink:  ../3854538.1620081771@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3854538.1620081771@sss.pgh.pa.us

 ·  · 

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: tgl@sss.pgh.pa.us, michael@paquier.xyz, bharath.rupireddyforpostgres@gmail.com, masao.fujii@oss.nttdata.com
  Subject: Re: Simplify backend terminate and wait logic in postgres_fdw test
  In-Reply-To: <3854538.1620081771@sss.pgh.pa.us>
  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> <CALj2ACWkpUETxAVDnMzgVafVs-WAPkHgiAQucCNFweOY35RZMQ@mail.gmail.com> <YHVKzork+QvH29fX@paquier.xyz> <YHZ+pnpfZYrHL3GU@paquier.xyz> <3854538.1620081771@sss.pgh.pa.us>

* 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