Re: pg_repack: WARNING: relation must have a primary key or not-null unique keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eugene Pazhitnov <pazhitnov(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_repack: WARNING: relation must have a primary key or not-null unique keys
Date: 2020-06-16 14:12:18
Message-ID: 1301065.1592316738@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eugene Pazhitnov <pazhitnov(at)gmail(dot)com> writes:
> xbox=> \d herostat
> ...
> "herostat_pkey" PRIMARY KEY, btree (xuid, titleid, heroid) INCLUDE (valfloat)

> eugene(at)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pepe TD Vo 2020-06-16 14:20:56 create batch script to import into postgres tables
Previous Message Susan Joseph 2020-06-16 14:12:04 Minor Upgrade Question