BUG #18828: Crash when pg_get_logical_snapshot_meta() passed empty string

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: tharakan(at)gmail(dot)com
Subject: BUG #18828: Crash when pg_get_logical_snapshot_meta() passed empty string
Date: 2025-03-01 18:41:19
Message-ID: 18828-0f4701c635064211@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18828
Logged by: Robins Tharakan
Email address: tharakan(at)gmail(dot)com
PostgreSQL version: Unsupported/Unknown
Operating system: Ubuntu
Description:

Passing an empty string to the recently added extension function
pg_get_logical_snapshot_meta() triggers PANIC / Abort.

SQL
===
CREATE EXTENSION pg_logicalinspect;
SELECT pg_get_logical_snapshot_meta('');

Commit
======
.
.
Checking (56ba0463d38~950) - 3c7d78427e - fail
Checking (56ba0463d38~1110) - dc68515968 - Pass
Checking (56ba0463d38~1030) - 67a54b9e83 - Pass
Checking (56ba0463d38~990) - e2fd615ecc - Pass
Checking (56ba0463d38~970) - 665785d85f - fail
Checking (56ba0463d38~980) - b360d1762b - fail
Checking (56ba0463d38~985) - 04bec894a0 - fail
Checking (56ba0463d38~987) - d5ca15ee54 - fail
Checking (56ba0463d38~988) - 2453196107 - fail
Checking (56ba0463d38~989) - 7cdfeee320 - fail
Current=7cdfeee320e72162b62dddddee638e713c2b8680 - Commit Found.

Error Log
=========
2025-03-02 04:28:02.355 ACDT [3826851] PANIC: could not open file
"pg_logical/snapshots/": Is a directory
2025-03-02 04:28:02.355 ACDT [3826851] STATEMENT: select
pg_get_logical_snapshot_meta('');
2025-03-02 04:28:02.896 ACDT [3745459] LOG: client backend (PID 3826851)
was terminated by signal 6: Aborted
2025-03-02 04:28:02.896 ACDT [3745459] DETAIL: Failed process was running:
select pg_get_logical_snapshot_meta('');
2025-03-02 04:28:02.896 ACDT [3745459] LOG: terminating any other active
server processes

Output
======
smith(at)camry:~/proj/sqith$ psql -c "select
pg_get_logical_snapshot_meta('');"
PANIC: could not open file "pg_logical/snapshots/": Is a directory
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-03-01 20:47:12 Re: BUG #18828: Crash when pg_get_logical_snapshot_meta() passed empty string
Previous Message Sandeep Thakkar 2025-03-01 11:20:17 Re: BUG #18819: Error installing Postgresql