Re: walreceiver is uninterruptible on win32 - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: walreceiver is uninterruptible on win32
Date
Msg-id s2k3f0b79eb1004160003ndc57ccebr729ffd9c3f42eb57@mail.gmail.com
Whole thread Raw
In response to Re: walreceiver is uninterruptible on win32  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: walreceiver is uninterruptible on win32  (Robert Haas <robertmhaas@gmail.com>)
Re: walreceiver is uninterruptible on win32  (Fujii Masao <masao.fujii@gmail.com>)
Re: walreceiver is uninterruptible on win32  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Thu, Apr 15, 2010 at 11:26 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> I have to admit to finding this confusing.  According to the comments:
>
> +               /*
> +                * Don't emulate the PQexec()'s behavior of returning the last
> +                * result when there are many, since walreceiver never sends a
> +                * query returning multiple results.
> +                */
>
> ...but it looks like the code actually is implementing some sort of
> loop-that-returns-the-last result.

Yeah, it's not a very accurate description. And I found another problem:
libpqrcv_PQexec() ends as soon as an error result arrives even if its
state has not been PGASYNC_IDLE yet.

So I changed libpqrcv_PQexec() so that it emulates the PQexec()'s behavior
except the concatenation of error messages. How about the attached patch?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: Bob Lunney
Date:
Subject: Re: [PATCH] Add --ordered option to pg_dump
Next
From: Peter Eisentraut
Date:
Subject: Re: pgindent and tabs in comments