Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hl6nF-00061f-BB for pgsql-docs@arkaria.postgresql.org; Wed, 10 Jul 2019 07:13:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hl6nE-0004xN-3V for pgsql-docs@arkaria.postgresql.org; Wed, 10 Jul 2019 07:13:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hl6nD-0004tv-QD for pgsql-docs@lists.postgresql.org; Wed, 10 Jul 2019 07:13:31 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hl6nB-0000WW-Cb for pgsql-docs@lists.postgresql.org; Wed, 10 Jul 2019 07:13:31 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 48773201E3; Wed, 10 Jul 2019 03:13:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 10 Jul 2019 03:13:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=YZpaAylAV6hNC5obWxbvT6H81RP EcRu3Kb3+h3t+238=; b=isvq5VL3LIQK+hlGXUZxmLfJEn7SCQPA1+J2QQSoza3 7xRoeoR88eM3Kdy8SsWAvwLvDNZXLf8nci3ZaBN0XJ76xAlyEaOwKCvNgBFqQDs4 5YTj6u09eXSn37NaMLIyLpQEyXmbxA7j3Z2ney03A0LcLb94grk3GvNZQUhoZtXu JyZzNIPdR/BGNFMLHbLJPsp76Jk0V6seTuFweXmT8JwvoPM+/H3cSUgQ8J1Xq044 7/cp7dcXV1GmKuuoAEKYbsjVeY1ukCP7p/sNew6fgpB5/YDRjQO+k3QfHZoqonkF 9oTWIkkYOH72uT144bNB5Mc5bS39IiQlI6Tq5TJaSbg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=YZpaAy lAV6hNC5obWxbvT6H81RPEcRu3Kb3+h3t+238=; b=BP8gYRYuZM6RL/cvL2h6GI LOPHPMWX8PbNPTtxijiKl7LKNlv1d5ehyh8J1vQwtFu41HtS4835xNwPECtxSZVR 5p/AGkzUUmN+q7ouyTbGSE4w9KtdxBF+2cW1xwk2D9SS94byFF9V1KjN+jvMdiHj nDgI5Q0pJLDzhTv+wZlJZG6ohVxUeZ8qBr9vysdvcubVFRhLSLv0VD7Fl8jDKCAA l1BcaS8LOzEVUHFGHDYmH3ctvtJUlrAdDUsmzHfhnOTD8YvJ10xnEjb6sYCU2uTk f19LnkJbr80ebV3yJol2j5hspBJYEda9zBmOKS3qLjntAX3wvaGgiTyL3PII8v2A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgeehgdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddukedtrddukeehnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluh hsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 74AF580059; Wed, 10 Jul 2019 03:13:13 -0400 (EDT) Date: Wed, 10 Jul 2019 16:13:07 +0900 From: Michael Paquier To: Tom Lane Cc: Alvaro Herrera , Amit Langote , "David G. Johnston" , Bruce Momjian , phil.bayer@gmail.com, pgsql-docs@lists.postgresql.org, PostgreSQL-development Subject: Re: Postgres 11: Table Partitioning and Primary Keys Message-ID: <20190710071307.GB5042@paquier.xyz> References: <20190709225333.GA18051@alvherre.pgsql> <1341.1562713199@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tsOsTdHNUZQcU9Ye" Content-Disposition: inline In-Reply-To: <1341.1562713199@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --tsOsTdHNUZQcU9Ye Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 09, 2019 at 06:59:59PM -0400, Tom Lane wrote: > Alvaro Herrera writes: >> >> >> Unique constraints on partitioned tables (as well as primary keys) >> must constrain all the partition key columns. This limitation ex= ists >> because PostgreSQL can only enforce >> uniqueness in each partition individually. >> >> >=20 >> I'm not really sure about the "must constrain" verbiage. Is that really >> comprehensible? >=20 > I think "must include" might be better. +1. >> which may not be the pinnacle of clarity, but took some time to craft >> and I think is correct. Also it doesn't mention primary keys >> explicitly; maybe we should patch it by adding "(as well as a primary >> key)" right after "a unique constraint". Thoughts? >=20 > I'd leave that alone. I don't think the parenthetical comment about > primary keys in your new text is adding much either. Agreed with not bothering about this block and not adding the parenthetical comment. -- Michael --tsOsTdHNUZQcU9Ye Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl0lkAMACgkQnvQgOdby QH371RAAnPM9l4ysNed1G3T+s2WEtkuFfeie/zzZM+HqJVIUYHO7/RFVfqVsQjrh zrQPS+e1HlwcaZMomghAb25ytjfeA9lxFljzy6cePtmCG9U4GhTMgH37hSfURoeQ jtFh21cWDJ4TWPiiCJU7M4cInEtTjNu2AdFMxyBtGhIfvk/h80at5jWDdZ/G7iHZ QZpZifT4UC2OUwcbJRPVUPhJZ4HM6RlPH071t2qe1nc8LVewFOnGFhqwQwVJwVFK mCKWy5cKwaSmEz7poAAjmrhQGfGCxQplPc48orPotfJfwVklkCTY+ws3+abwrkzW 8m1d5dDHtVEz+qcnQYg8pwRXe8VxQhnMb/OcwKoLyQ22r3ztxwIwp89mC8hrDjYl 895AREupZxXG3dmnMO9DZdPBJxYorN5k4lIWiH6xg5TixSVaIhIi4mTznXJ2Jjx5 pV21epoAO+3A7GsmjgR3uqN9EaeOkxKBRy6Tua/K3VVYvRdIBmz5TnerPaEHYHw9 8DDw8378ZxX2St5dW4ZEpCu5VRlyeXl0mAplHbNkdmUDPXF8JiRGAidGQ2cI1EKD RKtV6w4zbRRRoo6f17lJaTGWMAX7e8cAGO4KlPExPouSmERelY9KSkPT5c2IEt7X fRqTRZJPr1wLUL2bMJdOBkqXpw1Hszoi/VcsafweK8Ajjzj2iS8= =tCfd -----END PGP SIGNATURE----- --tsOsTdHNUZQcU9Ye--