Re: [pg_rewind] use the passing callback instead of global function

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [pg_rewind] use the passing callback instead of global function
Date: 2023-04-26 08:33:39
Message-ID: CAMbWs48AGydD=q2WP8kVD+XoBRxNyF7MfyRejB9y51DS33RVoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 26, 2023 at 9:51 AM Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:

> `local_traverse_files` and `libpq_traverse_files` both have a
> callback parameter but instead use the global process_source_file
> which is no good for function encapsulation.

Nice catch. This should be a typo introduced by 37d2ff38.

While this patch is doing it correctly, I'm wondering that since both
kinds of source server (libpq and local) are using the same function
(i.e. process_source_file) to process source file list for
traverse_files operations, do we really need to provide a callback? Or
will there be some kind of source server that may use different source
file processing function?

Thanks
Richard

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2023-04-26 08:47:43 Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
Previous Message Drouvot, Bertrand 2023-04-26 08:14:18 Re: Add two missing tests in 035_standby_logical_decoding.pl