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 1sB51e-00E9WS-Fz for pgsql-hackers@arkaria.postgresql.org; Sun, 26 May 2024 03:58:27 +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 1sB51e-003L4O-Ec for pgsql-hackers@arkaria.postgresql.org; Sun, 26 May 2024 03:58:26 +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 1sB51e-003L4F-56 for pgsql-hackers@lists.postgresql.org; Sun, 26 May 2024 03:58:26 +0000 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sB51b-000nRG-NJ for pgsql-hackers@lists.postgresql.org; Sun, 26 May 2024 03:58:25 +0000 Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-df771b45e13so2118026276.2 for ; Sat, 25 May 2024 20:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716695902; x=1717300702; 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=Dck536yNNP4mBn+mDG4LaBBbFgL3UWQ7wKLLarnPxXY=; b=En6MYi5aaupTCGMGRF4rJsZuEbKmbtrlIt13Cqq9IPwe2BNFzPNX/8555LYq0MOUIZ ciuwqs8AgmGoGmQ+Z0/N16p0BBEYLhOHzAoJ6c2kYu+nWv/SI/g9fLJ+Ly06nZB/rO8B fpB66OAalSNC58RNHiR2oZJHltWlBZP+RAgorGLL8wuq7XOWcmZ6+A7fhQQtBLGNJRao 83BGCQ70tj9g5XPLgVexh7+f1dBnvEh8vgjHzyPMyCMLvWv+3HJlQuJ1jKk0mDmkTHmt Owt95WrBRX8yJR0WKnXW37q8FrsQJv43MDHAmOG0Jx1qDlHNS1x5LgaCLdeNzeCqtFIL Q0tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716695903; x=1717300703; 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=Dck536yNNP4mBn+mDG4LaBBbFgL3UWQ7wKLLarnPxXY=; b=rT+U9JaTmjW3lMRXajPy6W1MO68QvWTBZLrgu/RO4urL+6FG38KddXWzC/ixwts11k /YLrgV7p1oxbzTBan0Zt39xlgiEiBzgY5zhZGPVUssX8s74G9VMnBHe8lSAwlj5Hxg5a orEjVUD+qy41jE9ZzQ/XgcenUMezxamXEClvHCzxThq4usLAo9hEWCnPHuTy78pkHGI7 ENWKdgmAwWRRU9wJb7SF+C+siDW8DG3rdYBjxmUbKKX+Yu9CUe+q7sTxuM/vTc5Xym38 VC4PjLywlaDB++QKX785ru1/napvKl8b1ji7o/QIBudiJpBHezj/n4YlzXhxjuhB0xNg 9LGg== X-Forwarded-Encrypted: i=1; AJvYcCWnfFDQQoGhay88fWFsPDoW2o7Ck7nAU4nbbPNJjAsOmsilWAIrZqXot2QZ8FevgRA/I8rLXH6yH/EYD2YCmhOVjvYpIcHkf1RBIEVlZbqgcdfN X-Gm-Message-State: AOJu0YzrVag2moHVw73yFHS1uKwZfAsWbsmjD/RzrKPANYGTl1/wbuRW K0H1f5W+9thfFu1f/5Itql9Bl2CA43TgOdNAevN/g7iLeJPR36eAEA2MOEIB7TUbouqBQw1h14Q 1ehs4BCay0F3PdZPoM4zAeE4/n/BpPUfkOe8= X-Google-Smtp-Source: AGHT+IG5n1gpMYV4z6/QgPYRhxDquOLL2V6ZcfmGxHW/PA/y55Jv48rvpPWGdgPjXqj3UM2pXfo6UfbEILWCFXs0tlg= X-Received: by 2002:a25:9348:0:b0:de6:d0a:ee3d with SMTP id 3f1490d57ef6-df7721c288dmr5597699276.30.1716695902563; Sat, 25 May 2024 20:58:22 -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: From: Alexander Korotkov Date: Sun, 26 May 2024 06:58: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 Sat, May 25, 2024 at 3:53=E2=80=AFPM Alexander Korotkov wrote: > 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' `s= eq 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= /regress/results/partition_split.out > > --- .../src/test/regress/expected/partition_split.out 2024-05-15 17:1= 5:57.171999830 +0000 > > +++ .../src/test/regress/results/partition_split.out 2024-05-24 19:2= 8:37.329999749 +0000 > > @@ -625,8 +625,8 @@ > > SELECT pg_get_constraintdef(oid), conname, conkey FROM pg_constraint = WHERE conrelid =3D > > 'sales_feb_mar_apr2022'::regclass::oid; > > pg_get_constraintdef | conname | co= nkey > > ---------------------------------------------------------------------= +---------------------------------+-------- > > - CHECK ((sales_amount > 1)) |= sales_range_sales_amount_check | {2} > > FOREIGN KEY (salesperson_id) REFERENCES salespeople(salesperson_id) = | sales_range_salesperson_id_fkey | {1} > > + CHECK ((sales_amount > 1)) |= sales_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. ORDER BY is added in d53a4286d7 in these queries altogether with other catalog queries with potentially unstable result. ------ Regards, Alexander Korotkov Supabase