From: | Ted Yu <yuzhihong(at)gmail(dot)com> |
---|---|
To: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Operation log for major operations |
Date: | 2023-01-20 13:23:16 |
Message-ID: | CALte62w+yo33GxQ9FRc4Ho2Cp-phg0-SBiPoWr15Lc1H8gumJA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 20, 2023 at 1:19 AM Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> wrote:
> Thanks, Ted Yu!
>
> > Please update year for the license in pg_controllog.c
>
> License updated for files pg_controllog.c, controllog_utils.c,
> pg_controllog.h, controllog_utils.h.
>
> > +check_file_exists(const char *datadir, const char *path)
> > There is existing helper function such as:
> > src/backend/utils/fmgr/dfmgr.c:static bool file_exists(const char
> *name);
> > Is it possible to reuse that code ?
>
> There are a lot of functions that check the file existence:
>
> 1) src/backend/utils/fmgr/dfmgr.c:static bool file_exists(const char
> *name);
> 2) src/backend/jit/jit.c:static bool file_exists(const char *name);
> 3) src/test/regress/pg_regress.c:bool file_exists(const char *file);
> 4) src/bin/pg_upgrade/exec.c:bool pid_lock_file_exists(const char
> *datadir);
> 5) src/backend/commands/extension.c:bool extension_file_exists(const
> char *extensionName);
>
> But there is no unified function: different components use their own
> function with their own specific.
> Probably we can not reuse code of dfmgr.c:file_exists() because this
> function skip "errno == EACCES" (this error is critical for us).
> I copied for src/bin/pg_rewind/file_ops.c:check_file_exists() code of
> function jit.c:file_exists() (with adaptation for the utility).
>
> --
> With best regards,
> Dmitry Koval
>
> Postgres Professional: http://postgrespro.com
Hi,
Maybe another discussion thread can be created for the consolidation of
XX_file_exists functions.
Cheers
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2023-01-20 13:25:46 | Re: Non-superuser subscription owners |
Previous Message | Marco Slot | 2023-01-20 12:35:51 | Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher |