unexpected relkind: 73 ERROR with partition table index

From: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: unexpected relkind: 73 ERROR with partition table index
Date: 2018-06-26 12:18:18
Message-ID: CAKcux6mfYMS3OX0ywjOiWiGSEKhJf-1zdeTceHFbd0mScUzU5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hi,

I am getting "ERROR: unexpected relkind: 73" when trying to rename
partition table index with below test case.

create user u1 superuser;
create user u2 nosuperuser login;
\c postgres u1

create table public.part(c1 int, c2 int) partition by range(c1);
create table public.part_p1 partition of public.part for values from
(minvalue) to (0);
create table public.part_p2 partition of public.part for values from (0) to
(maxvalue);
create index part_idx on public.part(c1);

create table public.nopart (c1 int, c2 int);
create index nopart_idx on public.nopart(c1);

--switch to nonsuperuser
\c postgres u2

postgres=> --rename the index owned by another user --non partition table
postgres=> ALTER INDEX nopart_idx RENAME TO nopart_idx_renamed;
ERROR: must be owner of index nopart_idx
postgres=>
postgres=> --rename the index owned by another user --partition table
postgres=> ALTER INDEX part_idx RENAME TO part_idx_renamed;
ERROR: unexpected relkind: 73

Thanks & Regards,
Rajkumar Raghuwanshi
QMG, EnterpriseDB Corporation

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Arthur Zakirov 2018-06-26 12:20:29 PATCH: Update snowball stemmers
Previous Message Thomas Munro 2018-06-26 12:02:44 Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows