Re: pgsql: Fix an ancient oversight in libpq's handling of V3-protocol COPY - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: Fix an ancient oversight in libpq's handling of V3-protocol COPY
Date
Msg-id 20080115212245.GJ4473@alvh.no-ip.org
Whole thread Raw
In response to Re: pgsql: Fix an ancient oversight in libpq's handling of V3-protocol COPY  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: pgsql: Fix an ancient oversight in libpq's handling of V3-protocol COPY  (Simon Riggs <simon@2ndquadrant.com>)
Re: pgsql: Fix an ancient oversight in libpq's handling of V3-protocol COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Simon Riggs wrote:
> On Mon, 2008-01-14 at 18:46 +0000, Tom Lane wrote:
> > Log Message:
> > -----------
> > Fix an ancient oversight in libpq's handling of V3-protocol COPY OUT mode:
> > we need to be able to swallow NOTICE messages, and potentially also
> > ParameterStatus messages (although the latter would be a bit weird),
> > without exiting COPY OUT state.  Fix it, and adjust the protocol documentation
> > to emphasize the need for this.  Per off-list report from Alexander Galler.
>
> My reading of this is that previously a PQgetCopyData() operation would
> fail mysteriously because of
>
> i) a reload of postgresql.conf, following the setting of any of the
> following parameters client_encoding, DateStyle, TimeZone, and
> standard_conforming_strings.

Hmm, aren't ParameterStatus messages sent just before Ready For Query?

> ii) any previous LISTEN command on the session running the COPY

I don't think LISTEN is involved.  It's NOTICE that's a problem, not
NOTIFY.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Prevent CLUSTER from decreasing a relation's relfrozenxid.
Next
From: Simon Riggs
Date:
Subject: Re: pgsql: Fix an ancient oversight in libpq's handling of V3-protocol COPY