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.96) (envelope-from ) id 1vWuPO-00CVzc-2E for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Dec 2025 10:41:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vWuPM-00A93T-2Z for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Dec 2025 10:41:57 +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.96) (envelope-from ) id 1vWuPM-00A93L-1c for pgsql-hackers@lists.postgresql.org; Sat, 20 Dec 2025 10:41:57 +0000 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vWuPK-001kZ3-1r for pgsql-hackers@lists.postgresql.org; Sat, 20 Dec 2025 10:41:56 +0000 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-7cac9225485so2222858a34.3 for ; Sat, 20 Dec 2025 02:41:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766227312; x=1766832112; 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=OnPFy5XhuN/BoiNLGcFguellvPESo+J3SLq5B0WLAsc=; b=TPAjCf/MNfUfRJNSgasiFqbCLBTPtDVorsYlM7EzIIbH1hd1+CUT7Hxe5dbsqHkC2D 8AkfK2EwE4kE7GE4Tj5Itw2UVvasuAQdw3fDgl/fWW428T9FGe2Wt433HMnWe8Y532Xx 3mD7HWVRiLh0zbJ18q20CQmnkKNuzgft9pNRNv2uV/M7W71CNGiN7dUhX/T+KacBXGhB Thwt6qG5XEMdIKXQORqCRsFqLm9Nh81vE9jGZjstDqUP/kyqbSsaVOPouISUUidTfCJ4 eFixXXwdGQWaldwLDo9Qyxm/fF5AdBn9mSvWTANVLPdNvUooRWrBgYx6UbMmWrSXcNXm DDPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766227312; x=1766832112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OnPFy5XhuN/BoiNLGcFguellvPESo+J3SLq5B0WLAsc=; b=CkTPN/OgMEw1IawhbnFJ4SrFkW8c7i0lBDiuGtE9q2YTdiOAkS/kpCwI2p/vvDDrOd tvrCDV9+bCW7rEtIPWxuwBGjOUFgImglJZCb/FHVlqJ9WjF34arzacY/b0UT9D04Nw9i OWhCd4rrg7ESiDX6jxOyc+7MB3yOFwFy4kt7geB3NbnJpY+rcGhs6G7VIUreV+WLXkJN 0G1rb+p3zmtjWvhVozJAKjec7sOz8n5Cu2T7HP4O/CujKo6f8IzbVyvjjvAbKUvzO3p/ Ni/6oOK+qh2VK3k6gzO4Ttmv+XqZ9WzQspQQa8ZLHh46/0Z9LpyY+jCIPZHgJWAMYK2z r5IQ== X-Forwarded-Encrypted: i=1; AJvYcCUDTHPQtPfcC5w0jM+7O09PNlZlH1aEGFy585vGEbDw98D7gng5nbrlmgNBGchAlFx6B1aR3DGu88nldR/P@lists.postgresql.org X-Gm-Message-State: AOJu0YytpVzW23y1TEes+L5O+o5TkLaszWngSlg+je309IEXzNOgFTao Qc2r8HgbkpAvx3qdSvqUpAQtzP8yH1JINcSwbxjFg68V4yKjfH+RQgq3UjGEJUvn9aM4+QUzejl QPDZ+/pi56H1io77WGaSL5WEbkazP3g8= X-Gm-Gg: AY/fxX69Gh1IIy7c8hXOgKFzg+3VU3Km+HmNbxEq4ox5+rgpaso7iDIYPpeE//rzIiL HNy6xzLgs33hEgI8fiYi2oj2CIih5pXWJwxZSB/wBtAi9YZRKzcXZELYwEmqe3IljEcvxswHE3Z Wt/R8n4PX6wynw+LxCTHMc1RFCaqnc+5i+guSFgZjJ/rMhE2ZAUwDDfhqTzq1zx5fE1pyYP4d+F V+tRWsoPgALHCeVsyaCSsrnc0HoUk4qianbx8/P/eJ4z8LXCJ29iquDurLGI5Cw5VlbB52cA/PV S4Z6V6IqtwKUGsC51J5E8FkZSl7rEZkQ+ZAYJDa0VPwbDMbl/LNhsDDQE+yMCZZaGFz+txRfDSY QOsuw X-Google-Smtp-Source: AGHT+IE38VqnrmnuNy5cwXZK3QP98UoNbWFvffqFL/70Eov6yiMUEdBL9IqdC+ckUQmIVbGbw287veEo5BKCoqIYGU8= X-Received: by 2002:a05:6820:1ca1:b0:659:9a49:8f43 with SMTP id 006d021491bc7-65d0eb56dd7mr2157954eaf.84.1766227311630; Sat, 20 Dec 2025 02:41:51 -0800 (PST) MIME-Version: 1.0 References: <171085360143.2046436.7217841141682511557.pgcf@coridan.postgresql.org> <2643645f-2a02-43de-9321-c995ab1b7ef8@postgrespro.ru> <57a94d8a-d7b6-4c5e-9001-be1cd403b172@postgrespro.ru> <54414932-9E82-47AA-902B-2DED18F07F64@gmail.com> <3280c458-a886-4c58-8e2b-4d220b73161d@postgrespro.ru> <09414bf8-9326-431c-9422-b13bddf5f554@postgrespro.ru> <29ff27f5-d359-4479-b11c-ce28e525d806@postgrespro.ru> In-Reply-To: From: Alexander Korotkov Date: Sat, 20 Dec 2025 12:41:39 +0200 X-Gm-Features: AQt7F2oShyTM5Y7sMjNeQwf1KJ4CJcICieGXt6P2E6FJnqReYo0QCmt9xJRmO58 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Kirill Reshke Cc: zengman , pgsql-hackers 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 Hi Kirill! On Sat, Dec 20, 2025 at 10:58=E2=80=AFAM Kirill Reshke wrote: > I have been looking though git log, noticed this commit, and did small te= sts. > > This is what I found: > > ``` > reshke=3D# create table z(i int) partition by range(i); > CREATE TABLE > reshke=3D# create table z_1 partition of z for values from (0)to(1); > CREATE TABLE > reshke=3D# create table z_2 partition of z for values from (1)to(2); > CREATE TABLE > reshke=3D# alter table only z merge partitions (z_1,z_2) into z_12; > ALTER TABLE > reshke=3D# > > ``` > > IMO "alter table only ... merge partitions" does not make perfect > sense and should be rejected rather than executed. WDYT? Could you, please, clarify your point? I didn't quite get it. It looks like pretty basic example of merging two adjacent partitions. ------ Regards, Alexander Korotkov Supabase