pg_repack: WARNING: relation must have a primary key or not-nullunique keys - Mailing list pgsql-general

From Eugene Pazhitnov
Subject pg_repack: WARNING: relation must have a primary key or not-nullunique keys
Date
Msg-id CAGfKbEz-fhvhdfmrBmVFq4Jh0ftF+mSKW0Kr=1kYA1Um7AN-Hw@mail.gmail.com
Whole thread Raw
Responses Re: pg_repack: WARNING: relation must have a primary key or not-nullunique keys  (Michael Lewis <mlewis@entrata.com>)
Re: pg_repack: WARNING: relation must have a primary key or not-null unique keys  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hello everyone!

eugene@dignus:/var/www/html/health$ psql xbox
Timing is on.
psql (12.3 (Ubuntu 12.3-1.pgdg20.04+1))
Type "help" for help.

xbox=> \d herostat
                   Table "public.herostat"
  Column  |       Type       | Collation | Nullable | Default
----------+------------------+-----------+----------+---------
 xuid     | bigint           |           | not null |
 titleid  | bigint           |           | not null |
 value    | text             |           |          |
 valfloat | double precision |           |          |
 heroid   | integer          |           | not null |
Indexes:
    "herostat_pkey" PRIMARY KEY, btree (xuid, titleid, heroid) INCLUDE (valfloat)
    "herostat_heroid_idx" btree (heroid)
    "herostat_titleid_idx" btree (titleid)
Triggers:
    herostat_min_update BEFORE UPDATE ON herostat FOR EACH ROW EXECUTE FUNCTION suppress_redundant_updates_trigger()

xbox=> \q
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
eugene@dignus:/var/www/html/health$ pg_repack --version
pg_repack 1.4.5
eugene@dignus:/var/www/html/health$

What is wrong and what I can do to fix it?

--
Evgeny Pazhitnov

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Index no longer being used, destroying and recreating itrestores use.
Next
From: Laurenz Albe
Date:
Subject: Re: Something else about Redo Logs disappearing