public inbox for [email protected]
help / color / mirror / Atom feedFrom: Cary Huang <[email protected]>
To: [email protected]
Cc: SATYANARAYANA NARLAPURAM <[email protected]>
Subject: Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Date: Thu, 31 Mar 2022 22:01:04 +0000
Message-ID: <164876406444.1182.11596302572557875100.pgcf@coridan.postgresql.org> (raw)
In-Reply-To: <CAHg+QDdPrVig+h2X5s-2MRR_19Vmehpv0upktyRc85ZA_UQHbg@mail.gmail.com>
References: <CAHg+QDcVUss6ocOmbLbV5f4YeGLhOCt+1x2yLNfG2H_eDwU8tw@mail.gmail.com>
<CAHg+QDdPrVig+h2X5s-2MRR_19Vmehpv0upktyRc85ZA_UQHbg@mail.gmail.com>
Hello
pg_receivewal creates this .partial WAL file during WAL streaming and it is already treating this file as a temporary file. It will fill this .partial file with zeroes up to 16777216 by default before streaming real WAL data on it.
If your .partial file is only 8396800 bytes, then this could mean that pg_receivewal is terminated abruptly while it is appending zeroes or your system runs out of disk space. Do you have any error message?
If this is case, the uninitialized .partial file should still be all zeroes, so it should be ok to delete it and have pg_receivewal to recreate a new .partial file.
Also, in your patch, you are using pad_to_size argument in function dir_open_for_write to determine if it needs to create a temp file, but I see that this function is always given a pad_to_size = 16777216 , and never 0. Am I missing something?
Cary Huang
===========
HighGo Software Canada
view thread (21+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
In-Reply-To: <164876406444.1182.11596302572557875100.pgcf@coridan.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox