Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nvze7-0004TC-EK for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2022 11:02:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nvze5-0006EU-6D for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2022 11:02:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nvze4-0006EK-Ov for pgsql-hackers@lists.postgresql.org; Tue, 31 May 2022 11:02:40 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nvzdt-0007T1-Ql for pgsql-hackers@lists.postgresql.org; Tue, 31 May 2022 11:02:39 +0000 Received: by mail-ej1-x632.google.com with SMTP id jx22so25766016ejb.12 for ; Tue, 31 May 2022 04:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=hI04YvlNd6rvg7U+Yg/sInHTqaeIZ9D8FTa90qQc9qQ=; b=A+cyPs7AsSxc2Zz6/TEgl6Lf33S0CEx49neeKmbRc7TitahsTK5wa2opn8Ujj/+Gq1 eDu8eTYguCXWViIeUi1loWyWdHKsJTxeejktqnQlc198CoCwKEwn54eFor8pe/NHeMcQ cEwk0uN9GpTFKo50KPOJwfI8YgIzVMui4B/gTY2fnfXEzcnRN0Yv83wo+wkVaO5Aud4Y mB9G8fmiQhB1XPEYbD8UMSBGJJDp9ewGNPtHom48nF8JR4qwL7qwW+k9LS7LNdxVTCYW 3SaOEPfak6vxLemlc5cGD6xXG07IsPE3JR+ZGPara8ICtONBTuRZVe1Z0lFyuvt79YzX m6Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=hI04YvlNd6rvg7U+Yg/sInHTqaeIZ9D8FTa90qQc9qQ=; b=gYhBoRc1Sddv6umSiM5vl9gFTMsS7z29+yQ5+3pXIRutKCRPglg0yCmiGQBnnZGITx Zst4wihL+AvYeuK4D2ATnhCwyVbm5qN6QF2iOCBheEWYCFXE9sYXcxN/53utVUj6FpSn hIXet9U7jFemCoB61Ogkp/rSInGpQ/fds7o1JteEh91GcMp6eAaYMJMxfectnODVGOEL 4H3f8atV1yNRQBD9d1OdxHeAKDZ+rYHPk5UhTYk/YqZJP4PhiQLY9xpCR7nNitOiECBY EiGkh1gVHROruPfX453IuiMfatCtWGuj/Do89axdWbusb7Ub/zOK2nK+rzVztq/dk/gT NUJw== X-Gm-Message-State: AOAM531LwyaWfH/ekK3oVmy/2U3nU5BEbsBOHyCD48Ibpt2p3LcA8ihi sPVzdv9yN25+C8ngkwSWCZl1xu+liC3SLA== X-Google-Smtp-Source: ABdhPJyhyFfZP81BnajjLwyzS/SsFH4Ccre0m7yBl5Cg4dQu/YodnXDWNPFuRhcK7JbSij9YaclGqw== X-Received: by 2002:a17:906:f17:b0:6fe:94f6:cb8a with SMTP id z23-20020a1709060f1700b006fe94f6cb8amr51345919eji.456.1653994947967; Tue, 31 May 2022 04:02:27 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:8496:47b0:e18d:1f9a:4c26]) by smtp.gmail.com with ESMTPSA id m8-20020a056402430800b0042de29d8fc0sm1024845edc.94.2022.05.31.04.02.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 04:02:27 -0700 (PDT) Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands From: Laurenz Albe To: Dmitry Koval , PostgreSQL Hackers Date: Tue, 31 May 2022 13:02:27 +0200 In-Reply-To: References: <163714495450.16056.3566953095730878367@malur.postgresql.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2022-05-31 at 12:32 +0300, Dmitry Koval wrote: > There are not many commands in PostgreSQL for working with partitioned > tables. This is an obstacle to their widespread use. > Adding SPLIT PARTITION/MERGE PARTITIONS operations can make easier to > use partitioned tables in PostgreSQL. > (This is especially important when migrating projects from ORACLE DBMS.) > > SPLIT PARTITION/MERGE PARTITIONS commands are supported for range > partitioning (BY RANGE) and for list partitioning (BY LIST). > For hash partitioning (BY HASH) these operations are not supported. +1 on the general idea. At least, it will makes these operations simpler, but probably also less invasive (no need to detach the affected partitions). I didn't read the patch, but what lock level does that place on the partitioned table? Anything more than ACCESS SHARE? Yours, Laurenz Albe