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 1hYvnd-0003QU-PQ for pgsql-general@arkaria.postgresql.org; Thu, 06 Jun 2019 17:03:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hYvnb-0008Hn-Pi for pgsql-general@arkaria.postgresql.org; Thu, 06 Jun 2019 17:03:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYvnb-0008Hg-Cv for pgsql-general@lists.postgresql.org; Thu, 06 Jun 2019 17:03:35 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYvnY-000844-Hk for pgsql-general@lists.postgresql.org; Thu, 06 Jun 2019 17:03:33 +0000 Received: by mail-qt1-x842.google.com with SMTP id h21so2236363qtn.13 for ; Thu, 06 Jun 2019 10:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=e2Tf5oQvXTntG1eidEphvD/SUStb/OWrxfrPHK3Vgew=; b=Op+hFCPxMbIwe/4zh84MmzwjR4Z/EMerW7Ph5hLzMzLg3ustM3dVvyzAtRIzuY2I8m kpD2xOwlDU5xRxKJsDN+ODlWqJa4jaXbxdgpYCUqL4hR8+zUKi/m9KpRvuCFgCHj0nP6 ZHcii9cqXtWPyfjfvANyCm46901IPFj41gWhwfdgN9cfkhT070PsVpZUA5mWnM5FkQDC vf81HhzVnp31IEeqy5UHfdYIf840AKlU6oRE4X4eoAGymG41YgJc/xwpFGbSjtpoO67y ISIAuRkCGCPZRcGHhfMXpJi4eH3IlrpAAXJn97CG1ehKo8YXxWtuXnRBTutuh4m7B/p+ AJyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=e2Tf5oQvXTntG1eidEphvD/SUStb/OWrxfrPHK3Vgew=; b=GLQ6G77V49mP2R+fNcsBaamhnxo8hzvuMjDhyp9SEIBINFOR/RHK4yrT++gLmSB9A1 Y06AWGPVDlAC7fgmLp89eFTz/yg5tNLJD7Ib3cCxtsXLp/dofX81Xpvgugcs7GH8+Htr xjRtAx7Z8FXN680ZbsvB3Dleq2JfWjT09qact4srIt8An9OTLxRIRyoJUHOl7yjPniwW UUwG+Z0Gr0f5HMCVMxrWu0nkogs8k59YZKOBd5c28GIVM/2THwojzhojxhd266oILvrI 93ad+I8sIYKy2iJUoJBggDLzRlIbjZIha09BjF3NxGqxO+g1LoK5msvz+cyElCbTzGCf wcbw== X-Gm-Message-State: APjAAAWyWe39Ds2SVMff7kTiDNi7ShojC2orqYMd7+oRoUa9x5zk/9zm T/My/cXo3/mXy1njo5uUH4n1zRk/6/ivFBMz0gmlBbWfoPzAuhpCfkgMM5ADXdI8l1nY8TmDcVx znozKP1v+0E5fFrmpOS49oS6Gek94g/Oli8J0h4640qqaXWSEHXZZwns8abEBXoKrf2tJknK2ac RkkBdxUtKskEYBI5EE X-Google-Smtp-Source: APXvYqwFEy8P+ovlw+K9oBtP8bp4i4djRbvEGvd4N1wkAJD3fv4GLk/5D3+xIjXvU398OdsybKBhPA== X-Received: by 2002:ac8:2cba:: with SMTP id 55mr25041328qtw.260.1559840611285; Thu, 06 Jun 2019 10:03:31 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.197]) by smtp.gmail.com with ESMTPSA id e66sm1397183qtb.55.2019.06.06.10.03.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jun 2019 10:03:30 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 72BE0120167; Thu, 6 Jun 2019 13:03:26 -0400 (-04) Date: Thu, 6 Jun 2019 13:03:26 -0400 From: Alvaro Herrera To: "Alex V." Cc: pgsql-general , tgl Subject: Re: Table partition with primary key in 11.3 Message-ID: <20190606170326.GA5550@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1985070938.2403.1559817000895.JavaMail.zimbra@pclovers.ru> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jun-06, Alex V. wrote: > I think that your position about primary keys in partitional tables is > not right. > > If we see regular table, one-field primary key is cross-table unique. > In partitional tables for users view we MUST also seen unique > one-field primary key because this is user requirement and another > keys can destroy logic between regular and partitional tables and > functionality of partitioning becomes useless. > For administrators of table we not-MAY, but MUST see one-field unique > primary key in cross-table realisation. > All another realizations are plugging holes in a hurry and non-logical > at global review of engine. If you are saying that you think that Postgres should support primary keys that don't necessarily overlap partition keys, then I agree with you. Please send a patch to implement that capability. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services