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 1qd9AL-002LHg-Qf for pgsql-committers@arkaria.postgresql.org; Mon, 04 Sep 2023 12:58: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 1qd9AK-00BKtK-K3 for pgsql-committers@arkaria.postgresql.org; Mon, 04 Sep 2023 12:58:52 +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 1qd9AK-00BKt4-CK for pgsql-committers@lists.postgresql.org; Mon, 04 Sep 2023 12:58:52 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qd9AG-002gYR-Tm for pgsql-committers@lists.postgresql.org; Mon, 04 Sep 2023 12:58:50 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 72F953200319; Mon, 4 Sep 2023 08:58:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 04 Sep 2023 08:58:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1693832326; x=1693918726; bh=TBgHGwJmGpzwjd93zXcuUIHN30qFGl4em9s mdhGWbj8=; b=ZcX4z26cuy2tZEy8dQHAfyBISNJt2BrhHokNBE11nTwzrs3kqeC 4EFAJP8V6dfXgnEMVaBAzjC+dCSMRCy80RvnqlknWlI0k1MxSJdsFgfJkO9nYXUP hNL2NIdD7PqPeQpqkc888xBQUWgp2UlwLUKnGXn9wEykPYveuKvRWULZuO4T8IxQ QLU1uZjO0vONEeg2xCc5HeWGJrH2TJkejCtUJqL0vTPXQcC41YqVfPBTi9LEa/5U ef7owbubTLwVUJWH3wsmUEzVbhLGcULl4rFF6DNE1fhYNHum4bQBjB5Y126bIJEL L5BCT3CzSiVWNA/7Qrin+uVMxOw8KRGUh8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1693832326; x= 1693918726; bh=TBgHGwJmGpzwjd93zXcuUIHN30qFGl4em9smdhGWbj8=; b=O 1+uLIDw6231YivI2XtDJXAmJZLNYnXB/nRbt5j1c0tvQVBQBUd73W4kGYR8aRrXt VSC/mq32zRyvMkE4Pm3HUVReGT1HlOavO6W5rtP23TC+ms/ixnEf1QnhW4fITO4Z 0xtKUKuFqYhODDlt4VDvWlJJTRLmpDJgzahAcnWhg052fRzDgCHLXkJyfqePuJMi R4JpGWJ8WHP5phEBbrhxfU72SplHlAOsSzl1flZ41OQLKS4kFxmGMbGS9RTroo81 12/wwTqE8IVljnWzhaF5AHyGBhDsA3Y8G3gQiAHYafOPddRmvZ5H0wvyGxeEBLfu feQdZic07ECw/UcjnUMrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegkedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqe enucggtffrrghtthgvrhhnpeduveelvdegfeegffdtieduueekieeutefghefgueehgefg vdfghfegffeutdekteenucffohhmrghinhepphhoshhtghhrrdgvshenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrsegvihhsvghn thhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Sep 2023 08:58:46 -0400 (EDT) Message-ID: <2a31d8ba-38e9-6335-8ba6-9d042c63473b@eisentraut.org> Date: Mon, 4 Sep 2023 14:58:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: pgsql: Fix pg_dump assertion failure when dumping pg_catalog. Content-Language: en-US To: Jeff Davis , pgsql-committers@lists.postgresql.org References: From: Peter Eisentraut 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 22.08.23 22:08, Jeff Davis wrote: > Fix pg_dump assertion failure when dumping pg_catalog. > > Commit 396d348b04 did not account for the default collation. > > Also, use pg_log_warning() instead of Assert(). > > Discussion: https://postgr.es/m/ce071503fee88334aa70f360e6e4ea14d48305ee.camel%40j-davis.com > Reviewed-by: Michael Paquier > Backpatch-through: 15 I have another question about this patch. The original issue was that it would trigger an Assert() inside pg_dump when some columns in pg_collation were null that were not expected. This patch now contains code like appendPQExpBufferStr(q, ", lc_collate = "); - appendStringLiteralAH(q, collcollate, fout); + appendStringLiteralAH(q, collcollate ? collcollate : "", fout); appendPQExpBufferStr(q, ", lc_ctype = "); - appendStringLiteralAH(q, collctype, fout); + appendStringLiteralAH(q, collctype ? collctype : "", fout); which would produce pg_dump output like CREATE COLLATION ... (provider = libc, lc_collate = , lc_ctype = ); which is not valid syntax.