Re: Add contrib/pg_logicalsnapinspect
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Peter Smith <smithpb2250@gmail.com>, shveta malik <shveta.malik@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-09-25T17:29:09Z
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
Attachments
- v10-0001-Add-contrib-pg_logicalinspect.patch (text/x-diff)
Hi,
On Wed, Sep 25, 2024 at 04:04:43PM +0200, Peter Eisentraut wrote:
> Is there a reason for this elaborate error handling:
Thanks for looking at it!
> + fd = OpenTransientFile(path, O_RDONLY | PG_BINARY);
> +
> + if (fd < 0 && errno == ENOENT)
> + ereport(ERROR,
> + errmsg("file \"%s\" does not exist", path));
> + else if (fd < 0)
> + ereport(ERROR,
> + (errcode_for_file_access(),
> + errmsg("could not open file \"%s\": %m", path)));
>
> Couldn't you just use the second branch for all errno's?
Yeah, I think it comes from copying/pasting from SnapBuildRestore() too "quickly".
v10 attached uses the second branch only.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com