Re: Add contrib/pg_logicalsnapinspect
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Andres Freund <andres@anarazel.de>, Peter Smith <smithpb2250@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, shveta malik <shveta.malik@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2025-03-06T21:48:46Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix indentation issue
- b955df443405 18.0 cited
-
pg_logicalinspect: Stabilize isolation tests.
- a49927f04cd0 18.0 landed
-
Add contrib/pg_logicalinspect.
- 7cdfeee320e7 18.0 landed
-
Move SnapBuild and SnapBuildOnDisk structs to snapshot_internal.h.
- e2fd615ecc17 18.0 landed
On Wed, Mar 5, 2025 at 4:05 AM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
>
> Hi,
>
> On Wed, Mar 05, 2025 at 02:42:15PM +0530, Amit Kapila wrote:
> > On Wed, Mar 5, 2025 at 12:47 PM Bertrand Drouvot
> > <bertranddrouvot.pg@gmail.com> wrote:
> > >
> > > Agree, PFA a patch doing so.
> > >
> >
> > It would be better if you could add a few comments atop the
> > permutation line to explain the working of the test.
>
> yeah makes sense. Done in the attached, and bonus point I realized that the
> test could be simplified (so, removing useless steps in passing).
>
Thank you for the patch.
The new simplified test case can be pretty-formatted as:
init
begin
savepoint
truncate
checkpoint-1
get_changes-1
commit
checkpoint-2
get_changes-2
info_catchange check
info_committed check
meta check
IIUC if another checkpoint happens between get_change-2 and the
subsequent checks, the first snapshot would be removed during the
checkpoint, resulting in a test failure. I think we could check the
snapshot files while one transaction keeps open. The more simplified
test case would be:
init
begin
savepoint
insert(cat-change)
begin
insert(cat-change)
commit
checkpoint
get_changes
info_catchange check
info_committed check
meta check
commit
In this test case, we would have at least one serialized snapshot that
has both cat-changes and committed txns. What do you think?
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com