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 1sAqtx-00ChmY-UU for pgsql-hackers@arkaria.postgresql.org; Sat, 25 May 2024 12:53:35 +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 1sAqtw-00FQtJ-Db for pgsql-hackers@arkaria.postgresql.org; Sat, 25 May 2024 12:53:32 +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 1sAqtw-00FQt9-3v for pgsql-hackers@lists.postgresql.org; Sat, 25 May 2024 12:53:32 +0000 Received: from mail-yb1-xb34.google.com ([2607:f8b0:4864:20::b34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sAqtp-000hH0-1s for pgsql-hackers@lists.postgresql.org; Sat, 25 May 2024 12:53:31 +0000 Received: by mail-yb1-xb34.google.com with SMTP id 3f1490d57ef6-df4e0d8fa10so4008478276.1 for ; Sat, 25 May 2024 05:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716641603; x=1717246403; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ps77/jAloLChcedxShibq/tVkZTk5xZ1nCrtudmeauw=; b=ELiLap79UKL1M8Am10rL748rf3ByDimc16LJKz/QxkSyM3VisYo73r3xCre9tH+345 Sc95ejO+EBEToEd12ExUQG53bvMOyZqNqzzo/MdL2slGcYE6kmv40HlHpay2UGBNelrD VU8ME50O9wUuwLPnhJSlUVcl2Rz0MkELXQINbDwSXWo56/g8fghMAEme1SPu2y+KnxOC 91pFZjUerBFqyjw+2CjfMJEarmjsC4Mbh7eZ23+2y8TPznyfx4oePpI5A7Sm16eozsJN xji7YSf5w15XWMebgFJ+p0KFpodK7BqQn9DPz2J8mP+gwNTHwFtA2CMbzN5qmx9J3Cd3 loMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716641603; x=1717246403; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ps77/jAloLChcedxShibq/tVkZTk5xZ1nCrtudmeauw=; b=Qut0yooeNyH+w3VUJvrA5xbi1vP04eZG1Ted/5Dd7aE2LKdfL/zAiHWgtfrl9hyNLT agL24rYPyzU17fblHGnnWJSHEPxyRWGYiPzxPsE+KalC+WJ1e0fXLNzntKVu4If0jOcV tSDwp8rDEkG7qeOZBuezHIXpznmkpjR+QUszaXCxtSDwQFvUULuvPDV8KSYUo8fe7tmY v13jueUhfG9nCBrUaGPpHVhxl0+gTSevKAdokCG0xYY3InB5yCAZQlq21wF/snfNSLnK ut0twEd9B/5ZQpYFArSK075wN02NowBIBuEMhEM37o/wgUCo9Q+ed3o/2MSrxinQbiR9 DTSw== X-Forwarded-Encrypted: i=1; AJvYcCUCiYorKdVNOt1BOYG+DwPl1Q6o9AJkIYPp+sWeD3yP89Uy115IfFYXZ/sCIrcSME1p/yO+Dq9QG7ZUXnPrH2YIVPcTjKPLhYny4TMXj/ZymEjq X-Gm-Message-State: AOJu0YzY3GidN0kILbR0MN/Z2+wTleV5zQfcgqLeIKrtUtGO2PJRZR4t ipYfonkHGHu0T2t53Z5bxU0vBig0mQq+rz4DZWnIaQSQsmMm9uyRQm9DcB0p4xkyo8JPEB3nqIm t9zS/96D+rlg3yMu9GUW+Fq8tS2U= X-Google-Smtp-Source: AGHT+IG9qLBvmOpLRgFdhXi4N/eciBXbErsUHvJoGgATgPICDWXdt5xsb0PebmoeytTIIbFKozPceZgCta9UFESqJq4= X-Received: by 2002:a25:ac59:0:b0:df7:8ba2:b776 with SMTP id 3f1490d57ef6-df78ba2be53mr1234029276.43.1716641603502; Sat, 25 May 2024 05:53:23 -0700 (PDT) MIME-Version: 1.0 References: <0f655bcd-6487-4179-f9cf-c248efbad510@gmail.com> <41117807-3bea-45bc-a9c0-743c29abff2d@postgrespro.ru> <695264.1716578979@sss.pgh.pa.us> <99347349-ff6b-c580-531d-f12aec64caad@gmail.com> In-Reply-To: <99347349-ff6b-c580-531d-f12aec64caad@gmail.com> From: Alexander Korotkov Date: Sat, 25 May 2024 15:53:11 +0300 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Alexander Lakhin Cc: Tom Lane , Pavel Borisov , Justin Pryzby , Dmitry Koval , pgsql-hackers@lists.postgresql.org, Tomas Vondra , Alvaro Herrera Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, May 24, 2024 at 11:00=E2=80=AFPM Alexander Lakhin wrote: > > 24.05.2024 22:29, Tom Lane wrote: > > The partition_split test has unstable results, as shown at [1]. > > I suggest adding "ORDER BY conname" to the two queries shown > > to fail there. Better look at other queries in the test for > > possible similar problems, too. > > Yes, I've just reproduced it on an aarch64 device as follows: > echo "autovacuum_naptime =3D 1 > autovacuum_vacuum_threshold =3D 1 > autovacuum_analyze_threshold =3D 1 > " > ~/temp.config > TEMP_CONFIG=3D~/temp.config TESTS=3D"$(printf 'partition_split %.0s' `seq= 100`)" make -s check-tests > ... > ok 80 - partition_split 749 ms > not ok 81 - partition_split 728 ms > ok 82 - partition_split 732 ms > > $ cat src/test/regress/regression.diffs > diff -U3 .../src/test/regress/expected/partition_split.out .../src/test/r= egress/results/partition_split.out > --- .../src/test/regress/expected/partition_split.out 2024-05-15 17:15:= 57.171999830 +0000 > +++ .../src/test/regress/results/partition_split.out 2024-05-24 19:28:= 37.329999749 +0000 > @@ -625,8 +625,8 @@ > SELECT pg_get_constraintdef(oid), conname, conkey FROM pg_constraint WH= ERE conrelid =3D > 'sales_feb_mar_apr2022'::regclass::oid; > pg_get_constraintdef | conname | conk= ey > ---------------------------------------------------------------------+-= --------------------------------+-------- > - CHECK ((sales_amount > 1)) | s= ales_range_sales_amount_check | {2} > FOREIGN KEY (salesperson_id) REFERENCES salespeople(salesperson_id) | = sales_range_salesperson_id_fkey | {1} > + CHECK ((sales_amount > 1)) | s= ales_range_sales_amount_check | {2} > (2 rows) > > ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO Tom, Alexander, thank you for spotting this. I'm going to care about it later today. ------ Regards, Alexander Korotkov Supabase