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 1jlCKA-0007Ml-IE for pgsql-general@arkaria.postgresql.org; Tue, 16 Jun 2020 14:12:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jlCK9-0000RS-FJ for pgsql-general@arkaria.postgresql.org; Tue, 16 Jun 2020 14:12:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlCK9-0008Jf-6w for pgsql-general@lists.postgresql.org; Tue, 16 Jun 2020 14:12:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jlCK5-0006YM-3l for pgsql-general@lists.postgresql.org; Tue, 16 Jun 2020 14:12:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 05GECILw1301066; Tue, 16 Jun 2020 10:12:18 -0400 From: Tom Lane To: Eugene Pazhitnov cc: pgsql-general@lists.postgresql.org Subject: Re: pg_repack: WARNING: relation must have a primary key or not-null unique keys In-reply-to: References: Comments: In-reply-to Eugene Pazhitnov message dated "Tue, 16 Jun 2020 13:52:32 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1301064.1592316738.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 16 Jun 2020 10:12:18 -0400 Message-ID: <1301065.1592316738@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Eugene Pazhitnov writes: > xbox=3D> \d herostat > ... > "herostat_pkey" PRIMARY KEY, btree (xuid, titleid, heroid) INCLUDE (= valfloat) > eugene@dignus:/var/www/html/health$ sudo -u postgres pg_repack -t herost= at > -N -d xbox > INFO: Dry run enabled, not executing repack > WARNING: relation "public.herostat" must have a primary key or not-null > unique keys Apparently pg_repack can't work with a primary key index that has INCLUDE columns. I have no idea whether that's a fundamental limitation or it's just that pg_repack hasn't been taught about the INCLUDE feature. In either case, you need to go consult pg_repack's author(s), who may or may not keep up on this list. regards, tom lane