Thread: unable to add or delete from table

unable to add or delete from table

From
Craig Russell
Date:
I'm using a postgresql database as the back end for opennms.  Everything
was running fine until I had to do some tuning a few weeks ago
(basically deleting old nodes, unmanaging interfaces, etc.) I did all of
this via the web ui that comes with opennms.  However, I discovered a
couple of days ago that I am no longer able to add or delete nodes.  It
appears that the node table is locked and nothing I have tried has
allowed me to modify this table. I have been able to work with the other
tables in the database just not the node table.

I am certainly not a sql expert but everything I have tried to date has
failed.

The command that I am running to delete a node from the command line is
as follows:

delete from node where nodeid=19;

This command just hangs at the command line and a ctrl-c jumps me out of
it.  All that appears to be logged is a "query cancelled by user".

I have tried reindexing the table, running a vacuum on the table and the
database, all to no avail.  I am able to run similar commands on other
tables to delete unwanted rows.

Any ideas on what I am missing here?

Thanks,

Craig Russell


Re: unable to add or delete from table

From
"Tomeh, Husam"
Date:
Check if the table is being locked by querying the pg_locks system view,
and resolve any locking if exists.

--
  Husam

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Craig Russell
Sent: Friday, November 03, 2006 10:41 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] unable to add or delete from table

I'm using a postgresql database as the back end for opennms.  Everything

was running fine until I had to do some tuning a few weeks ago
(basically deleting old nodes, unmanaging interfaces, etc.) I did all of

this via the web ui that comes with opennms.  However, I discovered a
couple of days ago that I am no longer able to add or delete nodes.  It
appears that the node table is locked and nothing I have tried has
allowed me to modify this table. I have been able to work with the other

tables in the database just not the node table.

I am certainly not a sql expert but everything I have tried to date has
failed.

The command that I am running to delete a node from the command line is
as follows:

delete from node where nodeid=19;

This command just hangs at the command line and a ctrl-c jumps me out of

it.  All that appears to be logged is a "query cancelled by user".

I have tried reindexing the table, running a vacuum on the table and the

database, all to no avail.  I am able to run similar commands on other
tables to delete unwanted rows.

Any ideas on what I am missing here?

Thanks,

Craig Russell


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may
containinformation that is legally privileged.  If you are not the addressee, or the person responsible for delivering
itto the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is
strictlyprohibited.  If you have received this message by mistake, please immediately notify us by replying to the
messageand delete the original message immediately thereafter. 

Thank you.

                                   FADLD Tag
**********************************************************************


Re: unable to add or delete from table

From
imad
Date:
What do the logs say when you are stuck? Can you afford a restart BTW ???

--Imad
www.EnterpriseDB.com

On 11/3/06, Tomeh, Husam <htomeh@firstam.com> wrote:
>
> Check if the table is being locked by querying the pg_locks system view,
> and resolve any locking if exists.
>
> --
>   Husam
>
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Craig Russell
> Sent: Friday, November 03, 2006 10:41 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] unable to add or delete from table
>
> I'm using a postgresql database as the back end for opennms.  Everything
>
> was running fine until I had to do some tuning a few weeks ago
> (basically deleting old nodes, unmanaging interfaces, etc.) I did all of
>
> this via the web ui that comes with opennms.  However, I discovered a
> couple of days ago that I am no longer able to add or delete nodes.  It
> appears that the node table is locked and nothing I have tried has
> allowed me to modify this table. I have been able to work with the other
>
> tables in the database just not the node table.
>
> I am certainly not a sql expert but everything I have tried to date has
> failed.
>
> The command that I am running to delete a node from the command line is
> as follows:
>
> delete from node where nodeid=19;
>
> This command just hangs at the command line and a ctrl-c jumps me out of
>
> it.  All that appears to be logged is a "query cancelled by user".
>
> I have tried reindexing the table, running a vacuum on the table and the
>
> database, all to no avail.  I am able to run similar commands on other
> tables to delete unwanted rows.
>
> Any ideas on what I am missing here?
>
> Thanks,
>
> Craig Russell
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
> **********************************************************************
> This message contains confidential information intended only for the use of the addressee(s) named above and may
containinformation that is legally privileged.  If you are not the addressee, or the person responsible for delivering
itto the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is
strictlyprohibited.  If you have received this message by mistake, please immediately notify us by replying to the
messageand delete the original message immediately thereafter. 
>
> Thank you.
>
>                                    FADLD Tag
> **********************************************************************
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>