Re: Add contrib/pg_logicalsnapinspect - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Add contrib/pg_logicalsnapinspect
Date
Msg-id Zs4vN8JSvO0i2LwM@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Add contrib/pg_logicalsnapinspect  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Add contrib/pg_logicalsnapinspect
List pgsql-hackers
Hi,

On Mon, Aug 26, 2024 at 07:05:27PM +0530, Amit Kapila wrote:
> On Thu, Aug 22, 2024 at 5:56 PM Bertrand Drouvot
> <bertranddrouvot.pg@gmail.com> wrote:
> >
> > Please find attached a patch to $SUBJECT.
> >
> > This module provides SQL functions to inspect the contents of serialized logical
> > snapshots of a running database cluster, which I think could be useful for
> > debugging or educational purposes.
> >
> 
> +1. I see it could be a good debugging aid.

Thanks for the feedback!

> >
> > 2. The SnapBuildOnDisk and SnapBuild structs are now exposed to public. Means
> > we should now pay much more attention when changing their contents but I think
> > it's worth it.
> >
> 
> Is it possible to avoid exposing these structures? Can we expose some
> function from snapbuild.c that provides the required information?

Yeah, that's an option if we don't want to expose those structs to public.

I think we could 1/ create a function that would return a formed HeapTuple, or
2/ we could create multiple functions (about 15) that would return the values
we are interested in.

I think 2/ is fine as it would give more flexiblity (no need to retrieve a whole
tuple if one is interested to only one value).

What do you think? Did you have something else in mind?

Regards,

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



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)
Next
From: Robert Haas
Date:
Subject: Re: allowing extensions to control planner behavior