Re: Use XLOG_CONTROL_FILE macro everywhere?

Anton A. Melnikov <a.melnikov@postgrespro.ru>

From: "Anton A. Melnikov" <a.melnikov@postgrespro.ru>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: daniel@yesql.se, peter@eisentraut.org, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, michael@paquier.xyz, pgsql-hackers@postgresql.org
Date: 2024-09-07T07:38:06Z
Lists: pgsql-hackers

Attachments

On 04.09.2024 11:09, Kyotaro Horiguchi wrote:
> Instead, I'd like to propose separating the file and
> path-related definitions from xlog_internal.h, as shown in the
> attached first patch. This change would allow some modules to include
> files without unnecessary details.
> 
> The second file is your patch, adjusted based on the first patch.
> 
> I’d appreciate hearing from others on whether they find the first
> patch worthwhile. If it’s not considered worthwhile, then I believe
> having postmaster include xlog_internal.h would be the best approach.

I really liked the idea of ​​extracting only the necessary and logically
complete part from xlog_internal.h.
But now the presence of macros related to the segment sizes
in the xlogfilepaths.h seems does not correspond to its name.
So i suggest further extract size-related definition and macros from
xlogfilepaths.h to xlogfilesize.h.

Here is a patch that tries to do this based on the your first patch.
Would be glad to hear your opinion.


With the best wishes,

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

Commits

  1. Use XLOG_CONTROL_FILE macro consistently for control file name.

  2. Doc: Update link to the mentioned subsection