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 1kZZ8V-0000Nx-E3 for pgsql-admin@arkaria.postgresql.org; Mon, 02 Nov 2020 12:40:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kZZ8U-0004p3-6S for pgsql-admin@arkaria.postgresql.org; Mon, 02 Nov 2020 12:40:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZZ8T-0004ov-So for pgsql-admin@lists.postgresql.org; Mon, 02 Nov 2020 12:40:33 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kZZ8Q-0002KF-HZ for pgsql-admin@postgresql.org; Mon, 02 Nov 2020 12:40:32 +0000 Received: by mail-qk1-x72c.google.com with SMTP id o205so4481652qke.10 for ; Mon, 02 Nov 2020 04:40:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:date:subject:message-id :to; bh=Idh8Kv1juweYSMSLj/ePd/YO/fT8evB4Isd88u4OkOs=; b=rt6fUgo1i05D+TJOE3mWS9RCl6XUd/VgKlw7ij1kWiOVPyQBFg2Z8EDG6kSDJRnQ3Y y7DR3xWRgWkYRYbD+IckHLVCKjIhoYQg0EJIa7hvdU15ZDIKU6vzmiw3NaKwHSF5/c4I Ry6Vk0ehLHYsjRyB6htodslV1vzz5VV/9lMNMPbMRwxPU6YPwKlNDFTulKc3GEkTJuGN vSTJEjQ1rCyM/jcA7wJ19fOl9zdOii/FiQRYJTm2A2pVfMmTP/tdll8ECSyRfdi8Z5IE Qlnj9xKWnfQqRppSVynwq/ml1Dp+kht9jAS3isro5wDhrlPhQUNdei/GywpI3YCWW6Y/ 6a5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version:date :subject:message-id:to; bh=Idh8Kv1juweYSMSLj/ePd/YO/fT8evB4Isd88u4OkOs=; b=DX3cLxx/ozOEw/PsP7YJ5cVju8+CGCKPD6MQceq6BybiLUCLwmcGxn5r3JO/fbOt0y xSSAEBl4eZwykSah1Y1iqZynJ+Z0IN5fv/9Sb1e2TBF4CrEdu/vadeTt4W0qRA2D78hV twDTmIMAQnbFroatbbt8jDSoyEVRuyA7HBp7qvpdCJ40D75X2maWuvsya14U9YP06Bnb t5GZZLuMTVlkLdONZ04QEaRRtnkrXN8dN2edt7oTbPbzkdqJWDRjgy5eP4bJlPyTjXlH 9Eab4W+DxCEO296uAyb+TGo8MkopkLe93ItD5OHENhHo2Adzcsi1JKcaxHlG0FthHqpK xneQ== X-Gm-Message-State: AOAM530Idg370FgsnyOi/02bU5vx6ZBL0FuPb3NbQouanwa0k3VADGL2 L/hi8alB40x0Fqn77Q21s4S7+jBJQ512Ww== X-Google-Smtp-Source: ABdhPJx/GLfpCzbP2w567+qz04wOx5teQbKdw5OnxW1JIuBBT/uOtU83FFUHAedAPCWl8AAitHlNbw== X-Received: by 2002:a05:620a:a99:: with SMTP id v25mr5352377qkg.406.1604320829119; Mon, 02 Nov 2020 04:40:29 -0800 (PST) Received: from [192.168.1.35] (cpe-71-72-37-104.neo.res.rr.com. [71.72.37.104]) by smtp.gmail.com with ESMTPSA id m26sm7799540qka.118.2020.11.02.04.40.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 04:40:27 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: John Scalia Mime-Version: 1.0 (1.0) Date: Mon, 2 Nov 2020 07:40:26 -0500 Subject: More on my partitioning problem Message-Id: To: pgsql-admin X-Mailer: iPad Mail (18A8395) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi guys, again, Laurenz=E2=80=99s suggestion to use create table like including all did not w= ork, due to the fact that the partitioning key is not part of the original b= ase table=E2=80=99s primary key. I had also forgotten about using the LIKE c= onstruct. So, thanks Laurenz, but this also means I cannot use INCLUDING IND= EXES, so I have to recreate all the indexes again on the new partitioned bas= e table,, but I=E2=80=99m having an issue with the new table=E2=80=99s prima= ry key. I created a UNIQUE INDEX on the new base table using the original primary ke= y and the partitioning key. So far, so good. But doing an ALTER TABLE ADD PR= IMARY KEY USING INDEX, is not supported. So. being that I already have a un= ique index here, does it really matter if I do not declare a primary key her= e? Otherwise, how would I go about creating a primary key on this partitione= d table? =E2=80=94 Jay Sent from my iPad=