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 1ul92k-00BRD7-QJ for pgsql-hackers@arkaria.postgresql.org; Sun, 10 Aug 2025 16:37:10 +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 1ul92h-007xeS-BC for pgsql-hackers@arkaria.postgresql.org; Sun, 10 Aug 2025 16:37:07 +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 1ul92g-007xeI-PF for pgsql-hackers@lists.postgresql.org; Sun, 10 Aug 2025 16:37:07 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ul92e-001ojt-0j for pgsql-hackers@postgresql.org; Sun, 10 Aug 2025 16:37:06 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-76b8d289f73so3268424b3a.1 for ; Sun, 10 Aug 2025 09:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1754843822; x=1755448622; darn=postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=2Es7ToS15B5LDmhSOAEgOAeNCDveq7cu57P5i9gxnVM=; b=AtWy/TAXxZeTsatOAVZKKJBY0pJ5P/lTCjelH+fQRHnpOuqqjJbTVn+z5QkFLObkrU Hzf2aGgaFGwGxIWn2d9I+yfdkjeG+JqjplLNn8aZEuJTTuSMGl3JY1aeBfHJZDRemDMt Ng0vw5ImACYFwAZ51STyze4iCNMnr3Z+fXedw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754843822; x=1755448622; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2Es7ToS15B5LDmhSOAEgOAeNCDveq7cu57P5i9gxnVM=; b=MdGrBr6GCnSzlsX8lSqRkTPCvEh8qY1FSlmGmRdQIisseE7SEbr7munzbi7p/ieaXX 9Sr7TyCi1dLWedvc80vBvPqSiKmqwYmr9F/MtM+hslZHnmslh7BYpVK7FGJvnnberWMI T3jHBrcFJ7O/D5PP2iz4nX0aRLSjXLJ7ZF+hYiduIO1fPmrLMwYpDh+ws3LOW3P77GT1 shV6xoEH0kRlv6fnlEsoUVu4CKTBSo21ZB5wA4hcZtrGg9eSS41OyB0X9YFQMNJxX124 C8HFgavamKI4sojGONwmptqBl1JiKXf1+fL1nnKnBRakdOmTPeB86sYgN9orgon24FZo SUlw== X-Forwarded-Encrypted: i=1; AJvYcCVPuuUg+jIQxr8hFJdcqH3BMGE6PdI6bdJUFTknvdpSZqozPK+iPWef2Ejy+mPWnS0zfgHmnUHmMB5jdG3H@postgresql.org X-Gm-Message-State: AOJu0Yx4/iP0U1958jJv1JuYOmtrYCN75JdsD+uLZIS/9oZnUdAW8HU0 csDgRvT8Rj3S/J6N3WvfccVRzMSIs05eQ8V1I9gy4KOthwNFMCsQfkZk1ehrNl/YjA== X-Gm-Gg: ASbGncvxgzsPV+qAz0F48MbNVqs3JGcl4rYqPM4DuR9u4ghv3LicaEcSSYRJ/47Rjl/ K5VNiuAQK2MX4+H8LICivgLEhg3wmnvYvhFRnSr2vQoXxlObxgBWMCpQL1jZ4EnIc5svhlWmRMn LvN21ysDHBTcVyU1z+qKyMpuWQQnRewg5wUPPK8R4XOX0Iu42fVGpvDhkMzjzHbdH3WvFyMr1c1 DvTO1dupRI+iqQk5s0UX+FY9PyxeIwhDH+RrFJFew7zKBXYcmQxTXL3ti88bgpEsJjMirFbsU1B tC34dxB5EhbhU+Aa/BkRbmVLU1doFJvR2vZkn5NkqpCYOPR139WtD2/usiQr9ChYu3qcoPuM1Zm 49KDTWKLgceRgD5cI68PzaF2c9fAeS+vKt9Dqesk+4BBNIrDMlJc= X-Google-Smtp-Source: AGHT+IGj8KLU3CBC5BgzS1QF4XF/l7Y6V6/++df4K7zpXHwJpai9zsh5OuUmdCv8m7/AjXBZL8kkkQ== X-Received: by 2002:a05:6a00:4f8f:b0:76b:f9f0:bef2 with SMTP id d2e1a72fcca58-76c4619a273mr14871275b3a.14.1754843821615; Sun, 10 Aug 2025 09:37:01 -0700 (PDT) Received: from google.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-76c61b958b0sm3822832b3a.44.2025.08.10.09.37.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Aug 2025 09:37:01 -0700 (PDT) Date: Sun, 10 Aug 2025 09:36:59 -0700 From: Noah Misch To: Kirill Reshke Cc: Alexander Lakhin , pgsql-hackers@postgresql.org, Robert Haas Subject: Re: Test instability when pg_dump orders by OID Message-ID: <20250810163659.71.nmisch@google.com> References: <20250707192654.9e.nmisch@google.com> <20250718191702.45.nmisch@google.com> <20250725022740.30.nmisch@google.com> <20250804000321.8b.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Aug 10, 2025 at 04:41:20PM +0500, Kirill Reshke wrote: > On Sun, 10 Aug 2025 at 12:00, Alexander Lakhin wrote: > > 04.08.2025 03:03, Noah Misch wrote: > > > Pushed as 0decd5e. ... > > > > Please look at a new anomaly introduced with that commit. The following > > script: > > createdb regression > > > > echo " > > CREATE USER u1; > > ALTER DEFAULT PRIVILEGES FOR ROLE u1 REVOKE INSERT ON TABLES FROM u1; > > > > CREATE USER u2; > > ALTER DEFAULT PRIVILEGES FOR ROLE u2 REVOKE INSERT ON TABLES FROM u2; > > " | psql regression > > > > pg_dump regression > > > > triggers: > > pg_dump: pg_dump_sort.c:454: DOTypeNameCompare: Assertion `0' failed. > > I reproduced this. Indeed, in case of default acl we happen to use OID sort. Thanks. Given the current state of freeze for tomorrow's release wrap, the decision is less obvious than usual. I'm seeing these options: 1. Remove the new assertion in v13-v18. 2. Push your proposed fix. 3. Change nothing. (This would be the choice if one is maximally concerned about deviating from the freeze and unconcerned about --enable-cassert builds of releases.) I am inclined to make today's change be (1). A fresh audit of catalog PRIMARY KEY and UNIQUE constraints didn't find any more missed cases, but (1) still feels like the right level of cautiousness. If there are no objections in the next 3hr, I'll proceed with (1). > PFA resolves this issue. I simply added DEFAULT ACL case-specific > tiebreaker that resolves object order. Thanks. Could you make src/test/regress create regression database objects so the code addition has coverage? Using pg_signal_backend and pg_read_all_settings as the default ACL role names should avoid that suite's limitations. (The suite must run under any role name and must drop any roles it creates, so it can't assume any particular non-system role name survives the suite.)