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

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Дата
Msg-id CALj2ACW7ixfwYX7fxhsFhVcyS9DEQF52GgUX7xGkLWuctcoo-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory  (mahendrakar s <mahendrakarforpg@gmail.com>)
Ответы Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory  (mahendrakar s <mahendrakarforpg@gmail.com>)
Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Fri, Aug 19, 2022 at 1:37 PM mahendrakar s
<mahendrakarforpg@gmail.com> wrote:
>
> Hi Bharath,
> I reviewed your patch. Minor comments.

Thanks.

> 1. Why are we not using durable_unlink instead of unlink to remove the partial tmp files?

durable_unlink() issues fsync on the parent directory, if used, those
fsync() calls will be per partial.tmp file. Moreover, durable_unlink()
is backend-only, not available for tools i.e. FRONTEND code. If we
don't durably remove the pratial.tmp file, it will get deleted in the
next cycle anyways, so no problem there.

> 2. Below could be a simple if(shouldcreatetempfile){} else{} as in error case we need to return NULL.

Yeah, that way it is much simpler.

Please review the attached v6 patch.

--
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: pg_receivewal and SIGTERM