RE: pg_recvlogical requires -d but not described on the documentation
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Fujii Masao' <masao.fujii@oss.nttdata.com>, "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, 'vignesh C' <vignesh21@gmail.com>
Date: 2025-03-19T02:32:26Z
Lists: pgsql-hackers
Attachments
- v3-0001-doc-Clarify-required-options-for-each-action-in-p.patch (application/octet-stream) patch v3-0001
- v3-0002-pg_recvlogical-allow-working-without-dbname-while.patch (application/octet-stream) patch v3-0002
Dear Fujii-san, > It looks like commit 0c013e08cfb introduced a bug that causes "pg_recvlogical > --drop-slot" > without --dbname to check whether it's connected to a specific database and fail > if it's not. > > This commit was added before 9.5, while pg_recvlogical was introduced in 9.4. On > my env, > "pg_recvlogical --drop-slot" without --dbname worked as expected in 9.4 but > started > failing in 9.5 or later. > > So, I think the proper fix is to avoid raising a fatal error even when not connected > to > a specific database in --drop-slot action. +1. I created patch to fix it. 0001 was completely same as you did. Best regards, Hayato Kuroda FUJITSU LIMITED
Commits
-
Allow pg_recvlogical --drop-slot to work without --dbname.
- c68100aa4313 18.0 landed
-
doc: Clarify required options for each action in pg_recvlogical.
- dfc13428a908 18.0 landed
-
Refactor replication connection code of various pg_basebackup utilities.
- 0c013e08cfbe 9.5.0 cited