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 1qdeck-004HkE-2W for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Sep 2023 22:34:18 +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 1qdebk-0053aL-HO for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Sep 2023 22:33:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdebk-0053a9-89 for pgsql-bugs@lists.postgresql.org; Tue, 05 Sep 2023 22:33:16 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qdebg-003HVc-De for pgsql-bugs@postgresql.org; Tue, 05 Sep 2023 22:33:15 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1c22103bce7so17916855ad.1 for ; Tue, 05 Sep 2023 15:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1693953190; x=1694557990; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=hv7xuDvIApkCLnohz8UHo2ocCJ7Tuw+xt38D7fqUJf8=; b=cJDJDIFjT74E+1+1/g8yCUOjuYK0zShxx85seXW1fObbP/q8dT5iEte8SxgH3IXRmM kitA3flzufUj+9AjZdPAhN0oJ1Gzyyr9IhfAtfkCQzgzxpExI8nxO09vRdHIEAFAqbwk OD9+Bv7mcW3D50lAGXUywYJlxAX/igaDrVTV6sYqhjvOfYWxWpcVRb0pkatPNg2h3myR eWQAhONe22DztGU3nTCVSWANs+SDrE4QAilHRBkQSmLK9XMGLiFUDrfpfcXJHVHfNlsU 8WhLsqOI1ZficeWJtHxeqp3u9R+XbLA8O/5OIiaEVKA0by/8VX5iLRixRLbYGQom2KE7 2sDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693953190; x=1694557990; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hv7xuDvIApkCLnohz8UHo2ocCJ7Tuw+xt38D7fqUJf8=; b=dbafn9IOFoAPYrT7HuuVHe3SfLgkmnEBDRAbQUT28z+t+gF/MbhjPsEp5fNdko80Dg JgvHmGRk33fgiwxHVmt0hVCat8jPYqnsW5dp+OVcdl56eXKRzFe1PObmm0aePMO8s4fH RC4YHwf99YQddXeCDhHgFWP1eiJ7CTUjc7IOW/+yM1J9AITpdEk8qKfmsTtl0zkS+fOX seQ8HOxtme3LXZEbR4T2o7GzqDstS9Q7LljfCAdjZM4yQZMQMRMdthEBmnnUrVl8ETgs FFx6ly32RsZ5R/+XpINGweGYh420BphBlhUHNNoeoYY+YD3FnlrFU/U5sfISNBsi6m4n oQSA== X-Gm-Message-State: AOJu0YxlaEbWvD0ULj+jRrmUj3D0n02WIXF7GYX4nthLrwaUO5xvTqPa TXzr1xo4QFg+AU+gvYsVA4wcvZ6HJIRxJR+8ILI= X-Google-Smtp-Source: AGHT+IH6sZZr6jM9A1nwjY1jBP/LU+T4Ay5WlBJLm4d4h9+Pa1fb+Jb74+C19ofXX1Ba5lHxQ7YoZw== X-Received: by 2002:a17:902:c951:b0:1bd:f314:7896 with SMTP id i17-20020a170902c95100b001bdf3147896mr14220045pla.25.1693953190185; Tue, 05 Sep 2023 15:33:10 -0700 (PDT) Received: from [172.18.4.30] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id 12-20020a170902c20c00b001b8b1f6619asm9827180pll.75.2023.09.05.15.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 15:33:09 -0700 (PDT) Message-ID: Subject: Re: pg_dump assertion failure with "-n pg_catalog" From: Jeff Davis To: Peter Eisentraut , Michael Paquier Cc: pgsql-bugs@postgresql.org Date: Tue, 05 Sep 2023 15:33:09 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-09-05 at 11:45 +0200, Peter Eisentraut wrote: > This new code replaces an (unexpected) null value with an empty > string.=20 > Is that correct?=C2=A0 Empty locale strings have specific behaviors under > the=20 > libc and icu providers.=C2=A0 It seems to me it would be better to error > out=20 > or don't print a CREATE COLLATION command at all rather than=20 > substituting a value that is not a correct substitute. It already issues a warning, which seemed more consistent with other unexpected situations in pg_dump. > Alternatively, a more correct way to produce a null value would be to > not issue the assignment at all (omit the " lc_collation =3D " etc.).=20 > Then we can leave it up to the backend to accept the command or not, > but=20 > at least the dump closely reflects the original catalog state. The backend does not accept a collation specified with lc_ctype and not lc_collate (or vice versa), so it would be an un-restorable dump. That doesn't seem great. Regards, Jeff Davis