On Tue, Apr 11, 2017 at 6:51 PM, Tom Lane wrote:
> Magnus Hagander writes:
> > Something like the attached?
>
> Not sure about
>
> + * All methods that have a failure path will set errno on failure.
>
> Given that you've got a getlasterror method, I
Magnus Hagander writes:
> Something like the attached?
Not sure about
+ * All methods that have a failure path will set errno on failure.
Given that you've got a getlasterror method, I don't think that's really
the API invariant is it? If it were, you'd just have the
On Tue, Apr 11, 2017 at 3:53 PM, Tom Lane wrote:
> Magnus Hagander writes:
> > On Tue, Apr 11, 2017 at 3:19 PM, Tom Lane wrote:
> >> I think the patch is correct, but if there's any documentation of the
> >> walmethod APIs that would
Magnus Hagander writes:
> On Tue, Apr 11, 2017 at 3:19 PM, Tom Lane wrote:
>> I think the patch is correct, but if there's any documentation of the
>> walmethod APIs that would allow one to assert which side of the API got
>> this wrong, I sure don't see
On Tue, Apr 11, 2017 at 3:19 PM, Tom Lane wrote:
> Magnus Hagander writes:
> > Attached patch reverses the check, and adds a failure message. I'd
> > appreciate a quick review in case I have the logic backwards in my
> head...
>
> I think the patch is
Hi Magnus,
> Attached patch reverses the check, and adds a failure message. I'd
> appreciate a quick review in case I have the logic backwards in my head...
Well, I can state that `make check-world` passes on my laptop and that
code seems to be right. However documentation to WalWriteMethod
On Tue, Apr 11, 2017 at 9:41 PM, Magnus Hagander wrote:
> This bug seems to have snuck in there with the introduction of walmethods.
> AFAICT we are testing the result of sync() backwards, so whenever a partial
> segment exists for pg_receivewal, it will fail. It will then
Magnus Hagander writes:
> Attached patch reverses the check, and adds a failure message. I'd
> appreciate a quick review in case I have the logic backwards in my head...
I think the patch is correct, but if there's any documentation of the
walmethod APIs that would allow one
This bug seems to have snuck in there with the introduction of walmethods.
AFAICT we are testing the result of sync() backwards, so whenever a partial
segment exists for pg_receivewal, it will fail. It will then unlink the
file, so when it retries 5 seconds later it works.
It also doesn't log the