Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: mahendrakar s <mahendrakarforpg(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Date: 2022-10-13 07:58:02
Message-ID: CALj2ACW+BEx3E4BUwaxzc_pn70rQPT=Bm0B==r2R8HUD4BGC+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 22, 2022 at 7:16 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> PSA v8 patch.

I simplified the code a bit by using a fixed temporary file name
(thanks Michael Paquier for the suggestion) much like the core does in
XLogFileInitInternal(). If there's any left-over temp file from a
crash or failure in dir_open_for_write(), that gets deleted in the
next call.

Please review the v9 patch further.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v9-0001-Make-WAL-file-initialization-by-pg_receivewal-ato.patch application/octet-stream 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-10-13 08:02:06 Re: SI-read predicate locks on materialized views
Previous Message kuroda.hayato@fujitsu.com 2022-10-13 07:39:30 RE: Add mssing test to test_decoding/meson.build