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 1rwNMa-001FEr-Rl for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 14:31:16 +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 1rwNMY-00DOVC-Lk for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 14:31:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rwNMY-00DOV4-CG for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 14:31:14 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rwNMV-002yWJ-OG for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 14:31:12 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-565c6cf4819so7113307a12.1 for ; Mon, 15 Apr 2024 07:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713191470; x=1713796270; 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=+P97Ee1YzyDD+bfXdpzQyvFb78ek7QcVLhYFk5mdu0E=; b=KihuYHMbGuZ7jcJ37n3V9139zCjWGTO4q83Qi+hcc0zsjZhkf0J4fYxWCk2q+rTR7j iyvBUiCL/lDZ1xJ7TDqYi9/6s99ou+PIgjYDTufuZGNufxja17O4zYZS0JrUQlnNf7s9 LbZHdKviS3p1gZX6R6Xv8MIcIN/wkqom8d3solln12k6CHBPcaoCsWPshUL2Zhip5n9I K4TH3rU7Qwhb2+XbhT73T7h/uy5yu2Y9ZxDoKbUFR+e4246QfprdSHFhcWrzwwENkFLB PCXy+VVgyK5dvFXwRlTJDEbKN1jFDCrfZKpmwW64VKye6IhP5Z7/QLWEf//ospoGoXcH 36yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713191470; x=1713796270; 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=+P97Ee1YzyDD+bfXdpzQyvFb78ek7QcVLhYFk5mdu0E=; b=IvRtRAY/8+gCY1AsHOvdZXjAX7QBmQL0dylEaIEveTEI8buaG2FkGGvgzO8e+/4bJL JA1dsb3yxAfJsjIqIy1ah8E9PnnT1M2fodmU52keQhW1hg4i6dXQtgU5uzg95EQfN8Lj bNXcroD6wpHnvSYHi6qijNOzWDyEk6Edj4QhrhGNU7g3YKk1vEVur2hPfz08AMyFM+y3 WTdJBr80TtO+f33IajpThGHtVXFA07BzWxPSdYnBjWfcbTUbi7kDQaJxwCGK/t+u4/zx eMqfSvnRu+Wh1ljNRGwsQdqBvAMPvDFxAkoT7uvndOq35WU5kTSTF5kI+CQM9+0ncspF EJbg== X-Forwarded-Encrypted: i=1; AJvYcCWe6UIOukJ5n+k/pjPQG0TLYdSEo/pYi3oYrSYkJv4Qfyy18DZESlngUkLzAMRzTsURtwyUg/Eo3e1Fg4eyxtHmU0o9oOF+mxoVX95XhvVq2++g X-Gm-Message-State: AOJu0YzED4nX0KXnVx65ff+AVdWdlwSmxek2NoocWmm927Chn5hrD15F d4ribxKXIorYXBTf4mT24aU5TYDM8x8QBpoCMI3K4+o3Eh91FwMZJoLyMArYpWSeMCdiXCClMQz E+SK3p/2sugzbSBTyaxFd2FPxs2Q= X-Google-Smtp-Source: AGHT+IFgGalyl9s0ZEFQaqMGS4Xd0SM+VHyEjY2UQbctPo3JwqT5+FZvsDRQ/TW8Vjs+HAMwUWfwrf/98r16rPDEmKk= X-Received: by 2002:a17:907:1116:b0:a52:6c32:c367 with SMTP id qu22-20020a170907111600b00a526c32c367mr1872033ejb.32.1713191469919; Mon, 15 Apr 2024 07:31:09 -0700 (PDT) MIME-Version: 1.0 References: <28ed1ee0-749d-9838-955e-abff42fc44be@gmail.com> <86bfd241-a58c-479a-9a72-2c67a02becf8@postgrespro.ru> <0f655bcd-6487-4179-f9cf-c248efbad510@gmail.com> In-Reply-To: From: Robert Haas Date: Mon, 15 Apr 2024 10:30:57 -0400 Message-ID: Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands To: Alexander Korotkov Cc: Dmitry Koval , Alexander Lakhin , PostgreSQL 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 On Sat, Apr 13, 2024 at 6:05=E2=80=AFAM Alexander Korotkov wrote: > Please, find a my version of this fix attached. I think we need to > check relpersistence in a similar way ATTACH PARTITION or CREATE TABLE > ... PARTITION OF do. I'm going to polish this a little bit more. + errmsg("\"%s\" is not an ordinary table", This is not a phrasing that we use in any other error message. We always just say "is not a table". + * Open the new partition and acquire exclusive lock on it. This will A minor nitpick is that this should probably say access exclusive rather than exclusive. But the bigger thing that confuses me here is that if we just created the partition, surely we must *already* hold AccessExclusiveLoc on it. No? --=20 Robert Haas EDB: http://www.enterprisedb.com