Re: Add TLI number to name of files generated by pg_waldump --save-fullpage

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: michael(at)paquier(dot)xyz
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, masao(dot)fujii(at)gmail(dot)com, david(dot)christensen(at)crunchydata(dot)com
Subject: Re: Add TLI number to name of files generated by pg_waldump --save-fullpage
Date: 2023-06-27 06:44:04
Message-ID: 20230627.154404.922227939135916807.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Tue, 27 Jun 2023 15:12:43 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> Hi all,
> (Fujii-san and David in CC.)
>
> Fujii-san has reported on Twitter that we had better add the TLI
> number to what pg_waldump --save-fullpage generates for the file names
> of the blocks, as it could be possible that we overwrite some blocks.
> This information can be added thanks to ws_tli, that tracks the TLI of
> the opened segment.
>
> Attached is a patch to fix this issue, adding an open item assigned to
> me. The file format is documented in the TAP test and the docs, the
> two only places that would need a refresh.
>
> Thoughts or comments?

It's sensible to add TLI to the file name. So +1 from me.

+# - Timeline number in hex format.

Arn't we reffering to it as "Timeline ID"? (I remember there was a
discussion about redefining the "timeline ID" to use non-orderable
IDs. That is, making it non-numbers.)

Otherwise it looks fine to me.

By the way, somewhat irrelevant to this patch, regading the the file
name for the output.

The file name was "LSNh-LSNl.spcOid.dbOid.relNumber.blk_forkname", but
the comment in the TAP script read as:

-# XXXXXXXX-XXXXXXXX.DBOID.TLOID.NODEOID.dd_fork with the components being:

which looks wrong. I'm not sure it is a business of this patch, though..

# Documentation looks coorect.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2023-06-27 06:46:37 Re: bgwriter doesn't flush WAL stats
Previous Message Ronan Dunklau 2023-06-27 06:39:59 Re: Add GUC to tune glibc's malloc implementation.