pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRHDB just sits and does nothing?
2+ messages / 2 participants
[nested] [flat]
* RHDB just sits and does nothing?
@ 2004-06-09 07:06 Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
0 siblings, 1 reply; 2+ messages in thread
From: Mauri Sahlberg @ 2004-06-09 07:06 UTC (permalink / raw)
To: pgsql-admin
Hi,
What an earth I am doing wrong? I am trying to delete about 6500 rows and
I am the only user connected to the database and it just sits there and
does nothing?
rahaks=# select count(*) from tilikartta where yritys=18231413;
count
-------
6347
(1 row)
rahaks=# explain delete from tilikartta where yritys=18231413;
QUERY PLAN
--------------------------------------------------------------
Seq Scan on tilikartta (cost=0.00..500.23 rows=249 width=6)
Filter: (yritys = 18231413)
(2 rows)
rahaks=# begin foo
rahaks-# ;
ERROR: parser: parse error at or near "foo" at character 7
rahaks=# begin;
BEGIN
rahaks=# set constraints all deferred;
SET CONSTRAINTS
rahaks=# delete from tilikartta where yritys=18231413;
Logs are fed to syslog and there I can see the following:
Jun 9 10:02:11 pihsi postgres[31547]: [19] LOG: query: select count(*)
from tilikartta where yritys=18231413;
Jun 9 10:02:11 pihsi postgres[31547]: [20] LOG: duration: 0.041401 sec
Jun 9 10:02:33 pihsi postgres[31547]: [21] LOG: query: explain delete
from tilikartta where yritys=18231413;
Jun 9 10:02:33 pihsi postgres[31547]: [22] LOG: duration: 0.000781 sec
Jun 9 10:02:41 pihsi postgres[31547]: [23] LOG: query: begin foo
Jun 9 10:02:41 pihsi postgres[31547]: [24] ERROR: parser: parse error at
or near "foo" at character 7
Jun 9 10:02:44 pihsi postgres[31547]: [25] LOG: query: begin;
Jun 9 10:02:44 pihsi postgres[31547]: [26] LOG: duration: 0.000181 sec
Jun 9 10:02:51 pihsi postgres[31547]: [27] LOG: query: set constraints
all deferred;
Jun 9 10:02:51 pihsi postgres[31547]: [28] LOG: duration: 0.000205 sec
Jun 9 10:03:04 pihsi postgres[31547]: [29] LOG: query: delete from
tilikartta where yritys=18231413;
It is now 10:09 local time and it still sits there and does nothing?
Table "public.tilikartta"
Column | Type | Modifiers
------------+------------------------+-----------
numero | integer | not null
tililaji | smallint | not null
kielikoodi | smallint | not null
yritys | integer | not null
selite | character varying(255) | not null
tilimalli | character varying(255) |
Indexes: pk_tilikartta primary key btree (numero, tililaji, kielikoodi,
yritys)
Foreign Key constraints: fk_tilikartta_yritys FOREIGN KEY (yritys)
REFERENCES yritys(numero) ON UPDATE NO ACTION ON DELETE NO ACTION,
fk_tilikartta_tilikarttamallit FOREIGN KEY
(tilimalli) REFERENCES tilikarttamallit(nimi) ON
UPDATE NO ACTION ON DELETE NO ACTIO
psql (PostgreSQL) 7.3.6-RH
contains support for command-line editing
rh-postgresql-server-7.3.6-1
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: RHDB just sits and does nothing?
@ 2004-06-09 14:46 Stephan Szabo <sszabo@megazone.bigpanda.com>
parent: Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
0 siblings, 0 replies; 2+ messages in thread
From: Stephan Szabo @ 2004-06-09 14:46 UTC (permalink / raw)
To: Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>; +Cc: pgsql-admin
On Wed, 9 Jun 2004, Mauri Sahlberg wrote:
> rahaks=# begin foo
> rahaks-# ;
> ERROR: parser: parse error at or near "foo" at character 7
> rahaks=# begin;
> BEGIN
> rahaks=# set constraints all deferred;
> SET CONSTRAINTS
In addition to the other messages, the above only defers deferrable
constraints. If you didn't specify initially deferred or deferrable when
creating the fk constraint, the above will not affect it.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-06-09 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 07:06 RHDB just sits and does nothing? Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>
2004-06-09 14:46 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
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