pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: lars@greiz-reinsdorf.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection
Date: Sun, 26 Nov 2023 02:36:57 -0500
Message-ID: <ZWL1maezJ6DPIdD3@tamriel.snowman.net> (raw)
In-Reply-To: <2524668.1700692174@sss.pgh.pa.us>
References: <18210-4c6d0b14627f2eb8@postgresql.org>
	<1675678.1700665886@sss.pgh.pa.us>
	<2199742.1700680746@sss.pgh.pa.us>
	<2524668.1700692174@sss.pgh.pa.us>

Greetings,

* Tom Lane (tgl@sss.pgh.pa.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

Attachments:

  [application/pgp-signature] signature.asc (832B, ../ZWL1maezJ6DPIdD3@tamriel.snowman.net/2-signature.asc)
  download

view thread (6+ messages)

Message-ID: <ZWL1maezJ6DPIdD3@tamriel.snowman.net>
Permalink:  ../ZWL1maezJ6DPIdD3@tamriel.snowman.net/
Also on:    postgresql.org/message-id/ZWL1maezJ6DPIdD3@tamriel.snowman.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: sfrost@snowman.net, tgl@sss.pgh.pa.us, lars@greiz-reinsdorf.de, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection
  In-Reply-To: <ZWL1maezJ6DPIdD3@tamriel.snowman.net>

* 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