Thread: tuplestore : write failed

tuplestore : write failed

From
snpe
Date:
What mean it ?
I have query :

SELECT DISTINCT n.nspname as pnspname,n2.nspname as fnspname, c.relname as prelname,
    c2.relname as frelname, t.tgconstrname, a.attnum as keyseq, ic.relname as fkeyname,
    t.tgdeferrable, t.tginitdeferred, t.tgnargs,t.tgargs, p1.proname as updaterule,
    p2.proname as deleterule,con.conname as conname
FROM pg_catalog.pg_namespace n, pg_catalog.pg_namespace n2,
    pg_catalog.pg_trigger t, pg_catalog.pg_trigger t1,
    pg_catalog.pg_class c, pg_catalog.pg_class c2,
    pg_catalog.pg_class ic, pg_catalog.pg_proc p1,
    pg_catalog.pg_proc p2, pg_catalog.pg_index i,
    pg_catalog.pg_attribute a,pg_catalog.pg_constraint con
WHERE (t.tgrelid=c.oid AND t.tgisconstraint
    AND t.tgconstrrelid=c2.oid AND t.tgfoid=p1.oid AND p1.proname like 'RI\\_FKey\\_%\\_upd')
    AND (t1.tgrelid=c.oid AND t1.tgisconstraint AND t1.tgconstrrelid=c2.oid
    AND t1.tgfoid=p2.oid AND p2.proname like 'RI\\_FKey\\_%\\_del') AND i.indrelid=c.oid
    AND i.indexrelid=ic.oid AND ic.oid=a.attrelid AND i.indisprimary  AND c.relnamespace = n.oid
    AND c2.relnamespace=n2.oid AND c2.relname='pg_class'
    AND (c2.oid =con.conrelid AND n.oid=con.connamespace AND con.contype='f' AND c.oid=con.confrelid)
ORDER BY prelname,keyseq

I try with pgsql 7.3b[12345],7.3rc[12] and 7.3
Query work sometime ; timing is from 1 second to 170 second, but sometime return
tuplestore : write error
database is almost emty - I have 10 tables with 10 primary and foreign keys (72 rows in pg_constraint)

query work fine with emty database (empty pg_constraint) - 1-2 second

regards
Haris Peco


Re: tuplestore : write failed

From
Tom Lane
Date:
snpe <snpe@snpe.co.yu> writes:
> Query work sometime ; timing is from 1 second to 170 second, but sometime return
> tuplestore : write error

The only common reason for that is running out of disk space.

            regards, tom lane

Re: tuplestore : write failed

From
Richard Huxton
Date:
On Thursday 28 Nov 2002 3:20 pm, Tom Lane wrote:
> snpe <snpe@snpe.co.yu> writes:
> > Query work sometime ; timing is from 1 second to 170 second, but sometime
> > return tuplestore : write error
>
> The only common reason for that is running out of disk space.

Given the number of tables in the query, have you tried an EXPLAIN? If you've
got unconstrained joins going on somewhere that could generate a huge
result-set. Sorry - haven't got time to try the query myself at present.

--
  Richard Huxton

Re: tuplestore : write failed

From
snpe
Date:
On Thursday 28 November 2002 03:20 pm, Tom Lane wrote:
> snpe <snpe@snpe.co.yu> writes:
> > Query work sometime ; timing is from 1 second to 170 second, but sometime
> > return tuplestore : write error
>
> The only common reason for that is running out of disk space.
>
I have >300mb on filesystems with PostgreSQL - query sometimes work, but I don't execute
another programs

Thanks
Haris Peco



Re: tuplestore : write failed

From
snpe
Date:
On Thursday 28 November 2002 04:33 pm, Richard Huxton wrote:
> On Thursday 28 Nov 2002 3:20 pm, Tom Lane wrote:
> > snpe <snpe@snpe.co.yu> writes:
> > > Query work sometime ; timing is from 1 second to 170 second, but
> > > sometime return tuplestore : write error
> >
> > The only common reason for that is running out of disk space.
>
> Given the number of tables in the query, have you tried an EXPLAIN? If
> you've got unconstrained joins going on somewhere that could generate a
> huge result-set. Sorry - haven't got time to try the query myself at
> present.

I do EXPLAIN
Query work sometime without any reason - I don't execute another program

Thanks
Haris Peco