Re: Updated version of pg_receivexlog - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Updated version of pg_receivexlog
Date
Msg-id CAHGQGwG==wdDrD9w045k4umWRhSto5_Jsqr7jYmgjBAsHC8SQw@mail.gmail.com
Whole thread Raw
In response to Re: Updated version of pg_receivexlog  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Updated version of pg_receivexlog
List pgsql-hackers
On Thu, Oct 27, 2011 at 5:18 PM, Magnus Hagander <magnus@hagander.net> wrote:
> Not sure I follow. When we arrive at PQgetCopyData() there should be
> nothing buffered, and if the end of stream happens there it returns
> -1, and we exit, no? So where is the data that's lost?
>
> I do realize we don't actually fsync() and close() in this case - is
> that what you are referring to? But the data should already have been
> write()d, so it should still be there, no?

Oh, right. Hmm.. xlogdump might be the cause.

Though I've not read the code of xlogdump, I wonder if it gives up
outputting the contents of WAL file when it finds a partial WAL page...
This strikes me that recovery code has the same problem. No?
IOW, when a partial WAL page is found during recovery, I'm afraid
that page would not be replayed though it contains valid data.

Regards,

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


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Updated version of pg_receivexlog
Next
From: Simon Riggs
Date:
Subject: Re: Hot Backup with rsync fails at pg_clog if under load