pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: unable to drop index because it does not exists
Date: Mon, 23 Sep 2019 07:23:27 -0500
Message-ID: <63949fa8-8032-2773-a06e-47736a33012a@gmail.com> (raw)
In-Reply-To: <CAKoxK+5mh58ow1gxD_MieBYONx6yupkfaexPuX+SU7b09nAM5Q@mail.gmail.com>
References: <CAKoxK+5mh58ow1gxD_MieBYONx6yupkfaexPuX+SU7b09nAM5Q@mail.gmail.com>

On 9/23/19 6:39 AM, Luca Ferrari wrote:
> Hi,
> running 11.5 I've got a partitioned table where I want to destroy an
> index (on a column that has nothing to do with the partition):
>
>
> respidb=# \d+ respi.root
>
>      Column    |            Type             |
> --------------+-----------------------------+-
>   sen_id       | integer                     |
>   mis_flusso   | integer                     |
>   mis_tasso    | integer                     |
>   mis_velocita | integer                     |
>   mis_ora      | timestamp without time zone |
>   pk           | bigint                      |
>   ts           | timestamp without time zone |
> Partition key: LIST (date_part('year'::text, mis_ora))
> Indexes:
>      "idx_root_sensore" btree (sen_id)
>      "idx_ts" btree (ts)
> Partitions: respi.y2018 FOR VALUES IN ('2018'), PARTITIONED,
>              respi.y2019 FOR VALUES IN ('2019'), PARTITIONED,
>              respi.y2020 FOR VALUES IN ('2020'), PARTITIONED
>
> respidb=# drop index idx_root_sensore;
> ERROR:  index "idx_root_sensore" does not exist
>
> Of course the index exists:
>
> SELECT oid, relname, relkind FROM pg_class WHERE relname = 'idx_root_sensore';
> -[ RECORD 1 ]-------------
> oid     | 40950
> relname | idx_root_sensore
> relkind | I
>
>
> I already did a manual vacuum on the table.
> Any idea?

Try specifying the schema name:

drop index respi.idx_root_sensore;


-- 
Angular momentum makes the world go 'round.





view thread (4+ messages)  latest in thread

Message-ID: <63949fa8-8032-2773-a06e-47736a33012a@gmail.com>
Permalink:  ../63949fa8-8032-2773-a06e-47736a33012a@gmail.com/
Also on:    postgresql.org/message-id/63949fa8-8032-2773-a06e-47736a33012a@gmail.com

 · 

reply

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: ronljohnsonjr@gmail.com
  Subject: Re: unable to drop index because it does not exists
  In-Reply-To: <63949fa8-8032-2773-a06e-47736a33012a@gmail.com>
  References: <CAKoxK+5mh58ow1gxD_MieBYONx6yupkfaexPuX+SU7b09nAM5Q@mail.gmail.com> <63949fa8-8032-2773-a06e-47736a33012a@gmail.com>

* 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