Re: Add contrib/pg_logicalsnapinspect

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add contrib/pg_logicalsnapinspect
Date: 2024-09-18 09:01:06
Message-ID: ZuqW0pJdoaa001p7@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Sep 18, 2024 at 11:33:08AM +0530, shveta malik wrote:
> Thanks for the patch. Few trivial things:
>
> 1)
> May be we shall change 'INTERNAL_SNAPBUILD_H' in snapbuild_internal.h
> to 'SNAPBUILD_INTERNAL_H'?

Indeed, done in v6 attached, thanks!

> 2)
> ValidateSnapshotFile()
>
> It is not only validating, but loading the content as well. So may be
> we can rename to ValidateAndRestoreSnapshotFile?

I see what you mean, we're also populating the SnapBuildOnDisk. I think your
proposal makes sense, done that way in v6.

> 3) sgml:
> a)
> + The pg_logicalinspect functions are called using an LSN argument
> that can be extracted from the output name of the
> pg_ls_logicalsnapdir() function.
>
> Is it possible to give link to pg_ls_logicalsnapdir function here?

Yes but I'm not sure that's needed. A quick "git grep "<function>" "*.sgml""
seems to show that providing a link is not that common.

> b)
> + Gets logical snapshot metadata about a snapshot file that is located
> in the pg_logical/snapshots directory.
>
> located in server's pg_logical/snapshots directory
> (i.e. use server keyword, similar to how pg_ls_logicalsnapdir ,
> pg_ls_logicalmapdir explains it)

Agree, done that way in v6.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v6-0001-Add-contrib-pg_logicalinspect.patch text/x-diff 43.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-09-18 09:02:36 Re: Detailed release notes
Previous Message Li, Yong 2024-09-18 08:40:02 Re: Separate HEAP WAL replay logic into its own file