RE: "Cluster" means "tangle" for me - Mailing list pgsql-general

From Jeff Eckermann
Subject RE: "Cluster" means "tangle" for me
Date
Msg-id 08CD1781F85AD4118E0800A0C9B8580B09488F@NEZU
Whole thread Raw
In response to "Cluster" means "tangle" for me  (Jeff Eckermann <jeckermann@verio.net>)
Responses Re: "Cluster" means "tangle" for me
List pgsql-general
Thanks for the advice.
I repeated the vacuum, but it completed without any mdopen notices this
time.
I created files corresponding to the temp* names from the last vacuum, but
was still unable to drop the table.
After confirming that there was no reference to the table name in any of the
system tables, I deleted the "dedcolo" file from the database directory.
Now I was able to create a table with that name.
I couldn't resist going back for a second try, using a similarly named table
with the same data (neither this nor the previous was a temp table, BTW):

extracts=# create table dedcolo (test text);
CREATE
extracts=# drop table dedcolo;
DROP
extracts=# \d dedcolo2
               Table "dedcolo2"
        Attribute         |  Type   | Modifier
--------------------------+---------+----------
 market_code              | text    |
 legacy_acct_no           | text    |
 usage_guiding            | text    |
 service_identifier       | text    |
 subscriber_no            | integer |
 rev_rcv_cost_center      | text    |
 arbor_acct_no            | integer |
 last_name                | text    |
 first_name               | text    |
 company_name             | text    |
 sales_code               | text    |
 date_created             | date    |
 tracking_id              | integer |
 product_start_date       | date    |
 product_stop_date        | date    |
 product_status           | text    |
 prod_billed_thru_date    | date    |
 element_id               | text    |
 equip_type               | text    |
 product_description      | text    |
 billing_frequency        | text    |
 rate                     | money   |
 rate_override_start_date | date    |
 rate_override_end_date   | date    |
 rate_override            | money   |
 disconnect_reason        | text    |
Indices: dc2_acct_i,
         dc2_et_i

extracts=# cluster dc2_acct_i on dedcolo2;
ERROR:  temp_28a1899 is an index relation
extracts=# \d dedcolo
Did not find any relation named "dedcolo".
extracts=# \d temp_28a1899
  Index "temp_28a1899"
   Attribute   |  Type
---------------+---------
 arbor_acct_no | integer
btree

extracts=#

This corresponds to the index being clustered.

> -----Original Message-----
> From:    Tom Lane [SMTP:tgl@sss.pgh.pa.us]
> Sent:    Tuesday, January 09, 2001 6:57 PM
> To:    Jeff Eckermann
> Cc:    'pgsql-general@postgresql.org'
> Subject:    Re: [GENERAL] "Cluster" means "tangle" for me
>
> Jeff Eckermann <jeckermann@verio.net> writes:
> > I would appreciate any advice on getting out of this strange situation.
> My
> > table now doesn't exist, but I can't recreate it either (at least under
> that
> > name).
>
> Hmm, was "dedcolo" a temp table?  It looks like clustering a temp table
> gets confused.  (In current sources, it's still pretty broken: the
> cluster succeeds, but the table is no longer temp afterwards ...
> will try to fix this for 7.1.)
>
> I'd suggest that you restart your session, then repeat the vacuum,
> and for each table that you get "mdopen" notices about, create an
> empty file by that name in the database directory.  Then you'll be
> able to drop that table.
>
>             regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: access checking using sql in 7.1beta3
Next
From: Stephan Szabo
Date:
Subject: Re: The type conversion CAST does not work ??