Use XLOG_CONTROL_FILE macro everywhere?

From: "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Use XLOG_CONTROL_FILE macro everywhere?
Date: 2024-04-19 03:50:39
Message-ID: 0841ec77-47e5-452a-adb4-c6fa55d605fc@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

There is a macro XLOG_CONTROL_FILE for control file name
defined in access/xlog_internal.h
And there are some places in code where this macro is used
like here
https://github.com/postgres/postgres/blob/84db9a0eb10dd1dbee6db509c0e427fa237177dc/src/bin/pg_resetwal/pg_resetwal.c#L588
or here
https://github.com/postgres/postgres/blob/84db9a0eb10dd1dbee6db509c0e427fa237177dc/src/common/controldata_utils.c#L214

But there are some other places where the control file
name is used as text string directly.

May be better use this macro everywhere in C code?
The patch attached tries to do this.

Would be glad if take a look on it.

With the best regards,

--
Anton A. Melnikov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
0001-Use-XLOG_CONTROL_FILE-macro-everywhere-in-C-code.patch text/x-patch 8.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2024-04-19 03:50:40 Re: Allow tests to pass in OpenSSL FIPS mode
Previous Message Colin Caine 2024-04-19 03:41:41 Okay to remove mention of mystery @ and ~ operators?