Skip site navigation (1) Skip section navigation (2)

Re: INSERT does not finish except if it is carried out a few minutes after the creation of the table

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Matthieu Guamis <matthieu(dot)guamis(at)axege(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: INSERT does not finish except if it is carried out a few minutes after the creation of the table
Date: 2006-09-13 03:29:17
Message-ID: 20060913032917.GA85698@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
[Please don't post HTML.]

On Tue, Sep 12, 2006 at 02:09:40PM +0200, Matthieu Guamis wrote:
> During the execution of the following requests, INSERT does not finish
> except if it is carried out a few minutes after the
> creation of the table. How to explain this latency time?
[...]
> insert into maTable (select * from
> ((select a.id1 ,b.id2 ,0
> from maTable a, maTable b
> group by a.id1,b.id2
> order by b.id2,a.id1)
> EXCEPT
> (select c.id1 ,c.id2 ,0
> from maTable c
> ))as tt;

This statement isn't syntactically correct; it has an unmatched
open parenthesis.  If I paste the statement into psql it appears
to hang, presumably because the parser thinks it's incomplete and
is waiting for more input.  Are you sure you've diagnosed the problem
correctly?  If so then please post a test case without errors so
others can attempt to duplicate the problem.

What version of PostgreSQL are you running and on what platform?
What client interface are you using?

> DROP and CREATE do their job but INSERT does not finish if it is
> carried out immediately after the CREATE. On the other hand
> if it is carried out a few minutes (~5min) later then INSERT commits
> in a few seconds.

A five-minute delay could hint at some possible causes, but first
let's find out whether syntax is the problem.

-- 
Michael Fuhr

In response to

Responses

pgsql-novice by date

Next:From: Matthieu GuamisDate: 2006-09-13 10:15:13
Subject: Re: INSERT does not finish except if it is carried out a
Previous:From: Don ParrisDate: 2006-09-13 01:15:37
Subject: Re: Question About Aggregate Functions

pgsql-general by date

Next:From: Francisco ReyesDate: 2006-09-13 05:01:19
Subject: Re: Superuser lost access to particular database
Previous:From: Jack OrensteinDate: 2006-09-13 01:57:33
Subject: Initializing Datums for use with SPI_execute_plan

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group