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 1rmWnY-008R1X-9O for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 10:34:25 +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 1rmWnW-00CkRT-4g for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Mar 2024 10:34:22 +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 1rmWnV-00CkR2-Cz for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2024 10:34:22 +0000 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmWnS-005LVD-Ja for pgsql-hackers@lists.postgresql.org; Tue, 19 Mar 2024 10:34:21 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 50F991140109 for ; Tue, 19 Mar 2024 06:34:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 19 Mar 2024 06:34:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1710844457; x=1710930857; bh=6rdH3CQ/p0EG3e+TlDxOKM0T+3ys 8xjZWWbRirQU+dw=; b=S+9R+DjcqbOt/XvrlwhtNXVMvmn/NwHsr4fIUM2V1d9j Ws5mHQ1LA+93tYQFiFmekhkFsQ2s5OMXK9sgpnoXQ/aSuEW7LASE5YXYffWuCPXP FCzIbSB+TZcImINspG/oK82+5NldvG+kfcg0kCDKf86c35h6IO14Pvpaqg1T7wdy q0pksKzGvMSsuVecWvKpRDU0cBl0Zzyep42qGtPGh+aBJ1BXp45zRbbCOT3aMn+H OqMlfGHYYNQ0R4svLNUOCyi+QYDQox4oGcl38E35/n1v/rZ9ZED/heonfIllvJ4N nw0DRMnJ5ATtPYeqWPG495wV4nTfxlZF5xK87aGR8g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeelgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgsehmkeerredttdejnecuhfhrohhmpeetlhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenuc ggtffrrghtthgvrhhnpeetleefjeektefhffegiedutddvhfefgfevheduheelfeehgfev leeggeegtefhleenucffohhmrghinhepphhoshhtghhrrdgvshdpvghnthgvrhhprhhish gvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 19 Mar 2024 06:34:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1710844455; bh=7o80fjM0ry8YnIogVmDOmIur1J4CVxoR+DjrYl/ZSOc=; h=Date:From:To:Subject:From; b=Pv+onznJ0D0f2XL2bX9dIVVsICBfsv7E8U0taI6Zo6UCD1hCjPWBWkFlWxVMeUdkd J0/tH2+ZHHDIXj3EqSKtgblJlz7yVQYIDIEemy8wFzvr4q/WN2/JAAeyQSx1RBz3rf 7Ggj49WWPKUdST/8qMbUc5RLL0obYQkWBKjJPlwp/1my5njNjxpBFoP6/P52ok/czQ DAujIOwPfP/DYsXC8iaUKrFANX2uf2EZtXBlDWn9EWNUck5Za/L6IPQlZYWON1K336 xYWEAr3Z9KL4QEK+ElSiFco+c+J31QCLiz3n18hpMPBERiO92KSWrgrxXbKCC4Ke2+ 7LPP/8osmZ+Dw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 3F500CD2; Tue, 19 Mar 2024 11:34:15 +0100 (CET) Date: Tue, 19 Mar 2024 11:34:15 +0100 From: Alvaro Herrera To: Pg Hackers Subject: minor tweak to catalogs.sgml pg_class.reltablespace Message-ID: <202403191034.scijmnv5lvll@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="clmzxrgc4yg2hor6" Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --clmzxrgc4yg2hor6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit While reviewing the patch for SET ACCESS METHOD[1] I noticed that pg_class.relam is not documented fully for partitioned tables, so I proposed the attached. Also, I remove a comment that merely repeats what was already said a few lines above. This is intended for backpatch to 12. [1] https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ --clmzxrgc4yg2hor6 Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Review-for-wording-on-tablespaces-on-partitioned-tab.patch" From fe4d53f33c688ab3ff132964bf42ba5fc8cdaa6e Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 19 Mar 2024 09:49:46 +0100 Subject: [PATCH] Review for wording on tablespaces on partitioned tables Remove a redundant comment, and document pg_class.relam in catalogs.sgml. After commits a36c84c3e4a9, 87259588d0ab and others. Discussion: https://postgr.es/m/202403191013.w2kr7wqlamqz@alvherre.pgsql --- doc/src/sgml/catalogs.sgml | 8 +++++--- src/backend/commands/tablecmds.c | 4 ---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 2f091ad09d..183669272b 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2011,9 +2011,11 @@ SCRAM-SHA-256$<iteration count>:&l (references pg_tablespace.oid) - The tablespace in which this relation is stored. If zero, - the database's default tablespace is implied. (Not meaningful - if the relation has no on-disk file.) + The tablespace in which this relation is stored; for partitioned + tables, the tablespace in which partitions are created + when one is not specified in the creation command. + If zero, the database's default tablespace is implied. + (Not meaningful if the relation has no on-disk file.) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 3ed0618b4e..6c0c899210 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -807,10 +807,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, } else if (stmt->partbound) { - /* - * For partitions, when no other tablespace is specified, we default - * the tablespace to the parent partitioned table's. - */ Assert(list_length(inheritOids) == 1); tablespaceId = get_rel_tablespace(linitial_oid(inheritOids)); } -- 2.39.2 --clmzxrgc4yg2hor6--