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 1weWJ6-004qXs-1t for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2026 11:07:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1weWJ5-007lwP-05 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2026 11:07:11 +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 1weWJ4-007lwH-2K for pgsql-hackers@lists.postgresql.org; Tue, 30 Jun 2026 11:07:10 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1weWJ2-00000000zcE-1oro for pgsql-hackers@lists.postgresql.org; Tue, 30 Jun 2026 11:07:10 +0000 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-519e7faecf1so65736161cf.0 for ; Tue, 30 Jun 2026 04:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782817626; cv=none; d=google.com; s=arc-20260327; b=Ei5JMCAfiHm9uP6wR0zjxZUwr2i7kGRpatFo/4N3xMeVqn7zs689/wpbZKnKwO1KJ+ nDSMaxJX7cvudIGQVoiqJXnn2A+O88bqN0yVIZtGv8uFKlMna6Gc70FownsP52H9Laj9 NuUPVu1rYDXcQOyVj0BMMzYxRdXqusqDOYlgSjiET2azC9Qm9c9mnyEjMQRPxDbr8JPN VBTd2Y9Be2vijQL32gT1tMDgucygqDCL69eG2fc/1R4d4mW9xS0lvfKspLlRkrw5RVZY s0Uae6nValchegfTfRMB/hfyGVzgjbAZBQWEuV/lKfYY3yU2ljFSeZ5PfQMmWVwf33iq xbAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TlPQOZH3rK78tPIY74nRyodcUjpx0KB3RNa/ZRf+KZU=; fh=lsccoL/ZKxjA92x2C9N1qWMd5kV/Qozlq2hZ7VBWfWQ=; b=Lid4+uNZu+Ut/nAdJjUhuUtvj9aAQfhUyUj5RfNGLEp0yxTIesxBh5T/cdqQnOaWqH KOed78biY1xZNN2garag+IDI3AVr2EBU8USVYJZhBter1F5zY0C8gYYh5hUj4s4ANNq7 cKkVRIK5KS7kM6o7lAAj4ju9/+hoKOKHLBvT3pzJ+zT9F4eS9JyK734zJ12x+ovLsJwt TCaqSAK8teDN2qkEEmrkiO0ZP5iiUahDIkfY2q7pn8vSCBCwubHdmWbtDKudNNTJ4Mp9 SCjOzwueKDiPSdHdYbl2OTdaQD0PGlGc6VFRQ/gvQzcGIDlTcVoFBjKe1kPO4xB840l9 u/NA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782817626; x=1783422426; 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=TlPQOZH3rK78tPIY74nRyodcUjpx0KB3RNa/ZRf+KZU=; b=WXSG0W7TIixTxNTJmmjgjRuszggsEuCJeM8VT19qIPVZCHeyOA//wWaLEPwI6VoZS5 6r2cUge7AWbzy+t5j6RZiqZnQwDEXOIRFGAK7OX+5IGXiOLGOpPE5Hq4DJAw3D86jtFp yUg+m3IE9bQqNrqKRoyf9keVgSQlQgVCukYaIPLWzsDQAHZV2uhNO895D/4ud2/qDXJj 81ZLzJhg3Xt1jyIG3/91vN7LQOWjTpV7Tiq412cW7ldP3PBV/fqaGqbTqF/GhzmcKDzM noo8w7NY7pCQ37Iv48AxlEsO2yDERFTTCfsPkJ58tLYA5Rm5EXo9aVDAMVB9FTc7Sszh m8Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782817626; x=1783422426; 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=TlPQOZH3rK78tPIY74nRyodcUjpx0KB3RNa/ZRf+KZU=; b=Ij/79IWhNuwkBUstst51w+aRPrwWPtCJlf6Yr4aUwjRGh9VIwFWz1d2S82OCMuZuVB HTDH1Pyz7K65ly2M1DuirQV5865x9Z+W+9v7sse+CXMKBrqBSMz/bF1XY/GIIDF/5reP k84vdm1nGvURwAeka3usrBejE8GoXr3RBaGZDA3dCL4PVfJQ2/ekk0rH365uM7fgNTG6 OE1f4d1WFzD67Fz1+dXd8qF3hteKUzYbh/t1WYyWQDeiqZ3L635xuoGmF0M/KJo1Sxql P2bbFvJ5xNCKDXxLveuuLTdKEfy2gbtVkaOmECQV3taCv+zh6hinHL/8KQO+7WKbfpGZ se3A== X-Forwarded-Encrypted: i=1; AFNElJ+FAdlw3irpOpaoQ25TAOskaxYD/gtp4ThJAOTCPnMvXkgZ/eK68ykw2TXJ+os1vxvnO29gdHdiBFHtK06t@lists.postgresql.org X-Gm-Message-State: AOJu0YwWIJvAqMRF5jFbYY2tp0rHAQnbuH9iD7LkgSTYyl3Mcp3JjlPJ s1LkCC6spvrgY4Ll9rEyx9gDjnQ8J6tPJVkhraT0BkQ4YyjDdAU1avWskHe9cd9/0qRjaef4LC0 uKo0vkLQexFUxYahY4hnDbJPlLD4sySw= X-Gm-Gg: AfdE7cnMM+3WX1bikuQ13vzi9ffJQeqt91BhBkBk8N7EdWUAUBhYLyXZ62grg+YMnyi 7abHiQ8jXHgnP6K+t5TE90mjnFjGn5/LSh7biMj6cgExo8+v2liIEJi5BI+dN6FJ+5Djj/xQ9kM i109mCUK8ZkygaSwOzEaA9yBJQ2HWXibeq3XyKZzKl4tX4alpyNE9MmDinGWaLB66xV1AKbYcar JNhrBx1mCwzevZ/VGDW7ExjnLgCJx1S62zd1jdmkM9u7MTRLV6pzINAubCwFG8CfDJI00MB1TUH ZteS7D6BYjre/j2bbMrJJSVcT06X5oi1BL9E7EByif9U1yq7mZSBCXlqO2mhskunymRUGA== X-Received: by 2002:a05:622a:15cb:b0:51a:896c:9abc with SMTP id d75a77b69052e-51c1c9f4b41mr1518381cf.30.1782817626266; Tue, 30 Jun 2026 04:07:06 -0700 (PDT) MIME-Version: 1.0 References: <232439a3-af7a-4a13-82ae-33da5520d4bf@postgrespro.ru> In-Reply-To: From: Alexander Korotkov Date: Tue, 30 Jun 2026 14:06:53 +0300 X-Gm-Features: AVVi8Cctf4hzeVeYw8hlibqrMFgDeuTUNS80LRweFz3PuSTzjtc2_rB_UD0cyhE Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Dmitry Koval Cc: Pavel Borisov , Justin Pryzby , pgsql-hackers@lists.postgresql.org 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, Jun 26, 2026 at 10:50=E2=80=AFPM Alexander Korotkov wrote: > On Fri, Jun 26, 2026 at 6:20=E2=80=AFPM Dmitry Koval wrote: > > If we exclude case with DEFAULT partition, MERGE PARTITIONS command was > > intended to be used when an incorrect table partitioning was chosen. > > For example, a table was initially partitioned by month, but later we > > needed to change table partitioning by quarter. In this case, MERGE > > PARTITIONS command should merge several adjacent partitions into one. > > Current checks are made for this case. > > > > >- If there's *no* default partition, then I think the check should be > > >relaxed; it's sufficient to verify that the bounds of the merged > > >partition do not overlap with any partition which is not being merged= ; > > > > It's probably possible to do this. But in this case, the command will > > not exactly be "MERGE PARTITIONS" ("MERGE PARTITIONS & EXPAND"?). > > +1, > We can implement a support for this for 20. For 19, I propose to > state the restriction more explicit in the docs. See the attached > patch. I'm going to push the docs patch if no objections. ------ Regards, Alexander Korotkov Supabase