Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: lars(at)greiz-reinsdorf(dot)de, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection
Date: 2023-11-26 07:36:57
Message-ID: ZWL1maezJ6DPIdD3@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Greetings,

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> I wrote:
> > I wonder if we should drop the idea of returning a positive bytecount
> > after a partial write, and just return the pqsecure_raw_write result,
> > and not reset PqGSSSendConsumed until we write everything presented.
> > In edge cases maybe that would result in some buffer bloat, but it
> > doesn't seem worse than what happens when the very first
> > pqsecure_raw_write returns EINTR.
>
> Here's a patch that fixes it along those lines. I like this better,
> I think, not least because it removes the assumption that "interesting"
> pqsecure_raw_write failures will recur on the next try.

Thanks for looking into this. I agree with this approach and took a
look through the patch and it all makes sense to me.

> Still need to look at syncing the backend with this.

I see you made similar changes to the backend and those also look good.

Thanks again,

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2023-11-27 02:45:35 Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows
Previous Message Rick Parrish 2023-11-26 05:46:37 psql include text file with bom