Re: GSSENC'ed connection stalls while reconnection attempts.

2020-07-14 Thread Kyotaro Horiguchi
At Tue, 14 Jul 2020 13:31:31 +0900 (JST), Kyotaro Horiguchi wrote in > Agreed to separate the change from this issue. I also don't think > that change in behavior dramatically improve the situation since we > should have had a bunch of trouble when a write actually failed in the > normal case.

Re: GSSENC'ed connection stalls while reconnection attempts.

2020-07-13 Thread Kyotaro Horiguchi
At Mon, 13 Jul 2020 11:08:09 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > At Fri, 10 Jul 2020 12:01:10 -0400, Tom Lane wrote > > intgl> >> I'm disinclined to mess with that, because (a) I don't think it's > > the > >> actual source of the problem, and (b) it would affect way more

Re: GSSENC'ed connection stalls while reconnection attempts.

2020-07-13 Thread Tom Lane
Kyotaro Horiguchi writes: > At Fri, 10 Jul 2020 12:01:10 -0400, Tom Lane wrote in >> The attached patch makes this all act more like the way SSL is handled, >> and for me it resolves the reconnection problem. > It looks good to me. OK, thanks. >>> The reason that psql doesn't notice the error

Re: GSSENC'ed connection stalls while reconnection attempts.

2020-07-12 Thread Kyotaro Horiguchi
At Fri, 10 Jul 2020 12:01:10 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > If psql connected using GSSAPI auth and server restarted, reconnection > > sequence stalls and won't return. > > Yeah, reproduced here. (I wonder if there's any reasonable way to > exercise this scenario in s

Re: GSSENC'ed connection stalls while reconnection attempts.

2020-07-11 Thread Tom Lane
I wrote: > Kyotaro Horiguchi writes: >> If psql connected using GSSAPI auth and server restarted, reconnection >> sequence stalls and won't return. > Yeah, reproduced here. (I wonder if there's any reasonable way to > exercise this scenario in src/test/kerberos/.) I tried writing such a test ba

Re: GSSENC'ed connection stalls while reconnection attempts.

2020-07-10 Thread Tom Lane
Kyotaro Horiguchi writes: > If psql connected using GSSAPI auth and server restarted, reconnection > sequence stalls and won't return. Yeah, reproduced here. (I wonder if there's any reasonable way to exercise this scenario in src/test/kerberos/.) > I found that psql(libpq) sends startup packet

GSSENC'ed connection stalls while reconnection attempts.

2020-07-10 Thread Kyotaro Horiguchi
Hello. If psql connected using GSSAPI auth and server restarted, reconnection sequence stalls and won't return. I found that psql(libpq) sends startup packet via gss encryption. conn->gssenc should be reset when encryption state is freed. The reason that psql doesn't notice the error is pqPacket