Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuxa5-00Euen-5P for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 17:51:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tuxa3-009E8r-O8 for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 17:51:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tuxa3-009E8j-El for pgsql-hackers@lists.postgresql.org; Wed, 19 Mar 2025 17:51:51 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tuxa0-003q46-1p for pgsql-hackers@lists.postgresql.org; Wed, 19 Mar 2025 17:51:50 +0000 Received: from [192.168.11.5] (p1695135-ipoe.ipoe.ocn.ne.jp [118.0.92.134]) by oss.nttdata.com (Postfix) with ESMTPSA id D128860F08; Thu, 20 Mar 2025 02:51:43 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: Date: Thu, 20 Mar 2025 02:51:43 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_recvlogical requires -d but not described on the documentation Content-Language: en-US To: "Hayato Kuroda (Fujitsu)" , "David G. Johnston" Cc: Ashutosh Bapat , "pgsql-hackers@lists.postgresql.org" , 'vignesh C' References: From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/03/19 11:32, Hayato Kuroda (Fujitsu) wrote: > 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. Thanks for the patch! It looks good to me. I'm considering whether to back-patch these changes to older versions. Since pg_recvlogical --drop-slot worked without --dbname in 9.4 but started failing unintentionally in 9.5, it could be considered a bug. However, this behavior has existed for a long time without complaints or bug reports, and there was no clear documentation stating that --drop-slot should work without --dbname. Given this, I think that also we could treat it as not a bug and apply the change only to the master branch. What do you think should we back-patch it as a bug fix or apply it only to master? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION