Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes
Date: 2012-08-10 00:19:44
Message-ID: 8579.1344557984@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Greg Williamson <gwilliamson39(at)yahoo(dot)com> writes:
> We have a small database (few hundred megs of data, lass than half that in indexes) that suffers from index bloat. Currently we handle this with an hourly REINDEX command. This works but causes some small issues, so I have been expploring other methods.
> When I try to to drop constraints (typically UNIQUE) I sometimes get a crash of the psql client at the ALTER TABLE X DROP CONSTRAINT, and sometimes after I recreate the constraint at a commit. Transcript below:

> usher=# BEGIN;
> BEGIN
> gusher=# ALTER TABLE ourcodes DROP CONSTRAINT IF EXISTS ourcodes_pkey CASCADE;
> ALTER TABLE
> gusher=# ALTER TABLE ourcodes ADD CONSTRAINT ourcodes_pkey PRIMARY KEY (id);
> NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "ourcodes_pkey" for table "ourcodes"
> ALTER TABLE
> gusher=# COMMIT;
> FATAL: terminating connection due to administrator command

WTF? That should certainly not happen. Have you perhaps got a script
that runs around sending SIGTERM to backends that it thinks are blocking
something? Does anything show up in the postmaster log when this
happens?

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Williamson 2012-08-10 00:35:10 Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes
Previous Message Greg Williamson 2012-08-10 00:04:42 Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes