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 1uppUY-00Cm7k-BY for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Aug 2025 14:45:15 +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 1uppUX-00FEbU-NV for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Aug 2025 14:45:14 +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 1uppUX-00FEan-59 for pgsql-hackers@lists.postgresql.org; Sat, 23 Aug 2025 14:45:14 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uppUU-001SLL-2Z for pgsql-hackers@postgresql.org; Sat, 23 Aug 2025 14:45:13 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-76e7af160f1so2169234b3a.1 for ; Sat, 23 Aug 2025 07:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1755960308; x=1756565108; 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=F8waqqSaEVck3IpNYxtbnJop+28oJU11X/m8ZObBl88=; b=c6YLW+JAyFf0An2Cc0Wkx1sccFvZQcZZ97MYeWG3pZ35LDSF4T0ewyoUTIOhrWiV3e MKpeUL+YItxDs8b5KdEEsN6lSdNWuq1to2j2Xy+dEUsCkJZrvfk5B/I3ATw4G6tFYV3h yMJG3QF0ciFepjuGA+ymWNP7XLrpYJvCGyCsQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755960308; x=1756565108; 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=F8waqqSaEVck3IpNYxtbnJop+28oJU11X/m8ZObBl88=; b=NJ50XjW2C5o/15AUf5xvivQKFg3wUTBoJhH0ADcEBuNx2LNaZoUDqDptqeruAPQV2E N3fccgBxzqEgvo+/AOwfqTI68dgYuDu/OMPd5pealP3dWfqHUNbxaiMnumzr4PVlrc/b 8xCSsw/c+iW8LcovesFgfCTIX2y9kPoJ01rtQbSCLqr6cClFlb2fbZV1O1Iuk5hi/cz0 ysulQegPik76b72bGfdoOUkh4g0v5gUcybANf9Ojp4MucKpHsrpLiqYh8R0BmcqvzLup L903p0SRH94hM4WCTeHUbiiA2oP2CuMqLyTs1Psogc7zV0tFBnSftgG5YTIL6Ji8PopO hLaA== X-Forwarded-Encrypted: i=1; AJvYcCU8zZyCtoZvzJi/52ReN+pJypzEqF+pNX2XJTzrKKYz2SYasiF5nCSKjA3m512mAptvxtyHuGTqKapBpRsP@postgresql.org X-Gm-Message-State: AOJu0YxxEsrxTtKKYGHng+T/X4/FHI1TUFd76G+K46ENpRVZX8TaMsUE 5QwerkZXMvFT6Lw3NIyqKjf8xWc3lddfuumYfzgtLgKODIPdeE25cR9leWCP8qJsoQ== X-Gm-Gg: ASbGncvB3cEOyY+Ztb0IYOcUVtQcMsTjjfL3t4XaX+SGrImfScrwHjtuUCYqVhSkdnN Il4lwnKaTOHduGwei3UPyX0jOuYUBXc9uHHEsjDQGNGKuZ/J6as+3Xnwt2BKeFycKN9SQv/OuMu iWlFplbLQf3UJciSqL9XZdFwi1NKzBzgUvg/rusi39orR7SAaz3D/De6HXhVOQx8EZO8t3iTXvZ 3AiH6kssYhBYaCaXsp3l16sGND1FJMCTzvOCREUZ2vZgkxxw+nURPFEcu5t8rdCSBp5jx+k0eI2 2Al3dbgbArEI0OMsjNs3BrlSxShWz81nx/FVtz5p2eUtv50qqn4Ilo9dhR2qltWMiuBPhjYoMzF JyHYAoUITlqCKeahpWXsfiUUxkM4XPkWpbvMlwdkv1qUS2rlqdRc= X-Google-Smtp-Source: AGHT+IF7/9T1FX6tgTk3WUsVzPezZTfZEAl3y+Sk1++MJMvWX2DDDCUg/0EysS3nJO5sn++6aupy5g== X-Received: by 2002:a05:6a20:1611:b0:240:d39:ffe5 with SMTP id adf61e73a8af0-24340d2dd58mr9529284637.38.1755960308036; Sat, 23 Aug 2025 07:45:08 -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 98e67ed59e1d1-3254aa71348sm2501440a91.29.2025.08.23.07.45.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Aug 2025 07:45:07 -0700 (PDT) Date: Sat, 23 Aug 2025 07:45:05 -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: <20250823144505.88.nmisch@google.com> References: <20250718191702.45.nmisch@google.com> <20250725022740.30.nmisch@google.com> <20250804000321.8b.nmisch@google.com> <20250810163659.71.nmisch@google.com> <20250823052019.43.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250823052019.43.nmisch@google.com> 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 Fri, Aug 22, 2025 at 10:20:19PM -0700, Noah Misch wrote: > On Mon, Aug 11, 2025 at 12:20:09AM +0500, Kirill Reshke wrote: > > On Sun, 10 Aug 2025 at 21:37, Noah Misch wrote: > > > 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.) > > > > Here is my attempt at implementing necessary legwork. It's v3 because > > I accidentally cleared the CC list in my previous attempt. Noah kindly > > explained to me how additions to the regress test will cause pg_dump > > logic to be tested as well. > > TIL 002_pg_upgarde.pl runs a regression suite, so if we create any > > database objects in it, it will end up being dumped and restored in > > that test. > > So, I checked that without changes in pg_dump_sort.c, 002_pg_upgarde > > fails and with changes it does not. > > Great. > > > PFA. I am not horribly sure about my additions to the > > `src/test/regress/sql/privileges.sql` file, maybe appending SQL to the > > end of the file is not the best option and there is a better place. > > I like how src/test/regress/sql/collate.icu.utf8.sql puts that kind of thing > just after cleanup, so I put it there. Pushed as b61a5c4 with a few other > cosmetic changes. Thanks. TestUpgradeXversion fails: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=copperhead&dt=2025-08-23%2007%3A34%3A38 --- /home/pgbf/buildroot/upgrade.copperhead/REL_18_STABLE/origin-REL_16_STABLE.sql.fixed 2025-08-23 10:28:16.464887433 +0200 +++ /home/pgbf/buildroot/upgrade.copperhead/REL_18_STABLE/converted-REL_16_STABLE-to-REL_18_STABLE.sql.fixed 2025-08-23 10:28:16.508887289 +0200 @@ -606490,13 +606490,13 @@ -- -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: -; Owner: pg_read_all_settings -- -ALTER DEFAULT PRIVILEGES FOR ROLE pg_read_all_settings REVOKE SELECT,INSERT,REFERENCES,DELETE,TRIGGER,TRUNCATE,UPDATE ON TABLES FROM pg_read_all_settings; -ALTER DEFAULT PRIVILEGES FOR ROLE pg_read_all_settings GRANT SELECT,REFERENCES,DELETE,TRIGGER,TRUNCATE,UPDATE ON TABLES TO pg_read_all_settings; +ALTER DEFAULT PRIVILEGES FOR ROLE pg_read_all_settings REVOKE ALL ON TABLES FROM pg_read_all_settings; +ALTER DEFAULT PRIVILEGES FOR ROLE pg_read_all_settings GRANT SELECT,REFERENCES,DELETE,TRIGGER,TRUNCATE,MAINTAIN,UPDATE ON TABLES TO pg_read_all_settings; Crossing the boundary of the MAINTAIN privilege existing seems relevant. Will fix. (My checklist did tell me to do a local run of TestUpgradeXversion. I skipped it, betting this patch wouldn't break that test. I lost that bet.)