Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux