pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory - Mailing list pgsql-hackers

From SATYANARAYANA NARLAPURAM
Subject pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Date
Msg-id CAHg+QDcVUss6ocOmbLbV5f4YeGLhOCt+1x2yLNfG2H_eDwU8tw@mail.gmail.com
Whole thread Raw
Responses Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
List pgsql-hackers
Hi Hackers,

I noticed that pg_receivewal fails to stream when the partial file to write is not fully initialized and fails with the error message something like below. This requires an extra step of deleting the partial file that is not fully initialized before starting the pg_receivewal. Attaching a simple patch that creates a temp file, fully initialize it and rename the file to the desired wal segment name.

"error: write-ahead log file "000000010000000000000003.partial" has 8396800 bytes, should be 0 or 16777216"

Thanks,
Satya

Attachment

pgsql-hackers by date:

Previous
From: Nikhil Benesch
Date:
Subject: Remove inconsistent quotes from date_part error
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Failed transaction statistics to measure the logical replication progress