Re: PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: ashutosh(dot)bapat(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org, Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp, fcs1(at)poczta(dot)onet(dot)pl
Subject: Re: PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING
Date: 2017-07-20 22:15:42
Message-ID: 18927.1500588942@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> writes:
> Here it is. First I tried this using ordinary regression
> framework but the effect of this patch is shown only in log and
> it contains variable parts so I gave up it before trying more
> complex way.

> Next I tried existing TAP test but this test needs continuous
> session to achieve alternating operation on two sessions but
> PostgresNode::psql doesn't offer such a functionality.

> Finally, I added a new TAP test library PsqlSession. It offers
> interactive psql sessions. Then added a simple test to
> postgres_fdw using it.

This seems like overkill. We can test it reasonably easily within the
existing framework, as shown in the attached patch. I'm also fairly
concerned that what you're showing here would be unstable in the buildfarm
as a result of race conditions between the multiple sessions.

I made some cosmetic updates to the code patch, as well.

I think this is actually a bug fix, and should not wait for the next
commitfest.

regards, tom lane

Attachment Content-Type Size
pgfdw_reconnect_on_option_change_v4.patch text/x-diff 12.7 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2017-07-20 22:23:05 Re: PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING
Previous Message buhhunyx 2017-07-20 07:40:40 Re: BUG #14750: Seq Scan instead of Index Scan works without limitation

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-07-20 22:23:05 Re: PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING
Previous Message Tom Lane 2017-07-20 20:21:57 Re: <> join selectivity estimate question