From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eugene Pazhitnov <pazhitnov@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_repack: WARNING: relation must have a primary key or not-null unique keys
Date: Tue, 16 Jun 2020 10:12:18 -0400
Message-ID: <1301065.1592316738@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGfKbEz-fhvhdfmrBmVFq4Jh0ftF+mSKW0Kr=1kYA1Um7AN-Hw@mail.gmail.com>
References: <CAGfKbEz-fhvhdfmrBmVFq4Jh0ftF+mSKW0Kr=1kYA1Um7AN-Hw@mail.gmail.com>
Eugene Pazhitnov <pazhitnov@gmail.com> writes:
> xbox=> \d herostat
> ...
> "herostat_pkey" PRIMARY KEY, btree (xuid, titleid, heroid) INCLUDE (valfloat)
> eugene@dignus:/var/www/html/health$ sudo -u postgres pg_repack -t herostat
> -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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, pazhitnov@gmail.com
Subject: Re: pg_repack: WARNING: relation must have a primary key or not-null unique keys
In-Reply-To: <1301065.1592316738@sss.pgh.pa.us>
References: <CAGfKbEz-fhvhdfmrBmVFq4Jh0ftF+mSKW0Kr=1kYA1Um7AN-Hw@mail.gmail.com> <1301065.1592316738@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox