Thread: tuplestore: write failed

tuplestore: write failed

From
"Fernando Papa"
Date:
(sorry if this post is duplicated... I send it first and then I
subscribe to list...)

Hi All!
I'm working on postgres for the last 3 weeks. I'm trying to port several
applications from oracle to postgres. I load all the tables and now I'm
testing performance issues. Today, when I execute a very heavy query,
the query abort (no message on client) in about 20/30 minutes. In
server's logfile I found this:

2002-10-16 11:53:25 ERROR:  tuplestore: write failed

I run again the query an I get the same error.
I check the disk space... everithing ok.

I did several modifications on postgres.conf:
tcpip_socket = true
shared_buffers = 16384
wal_buffers = 16
sort_mem = 512
vacuum_mem = 16384
wal_files = 4 # range 0-64
checkpoint_segments = 3
fsync=false
enable_seqscan = true
enable_indexscan = true
enable_tidscan = true
enable_sort = true
enable_nestloop = true
enable_mergejoin = true
enable_hashjoin = true
geqo = true
geqo_selection_bias = 2.0
geqo_threshold = 11
geqo_pool_size = 0
geqo_effort = 1
geqo_generations = 0
geqo_random_seed = -1
stats_start_collector = true
stats_reset_on_server_start = true
stats_command_string = true


I create several indexes after data load, and then run vacuum -z.

But I can't find any references for this error!

If anybody can guide me...

thanks in advance

--
Fernando O. Papa

Re: tuplestore: write failed

From
Tom Lane
Date:
"Fernando Papa" <fpapa@claxson.com> writes:
> In server's logfile I found this:

> 2002-10-16 11:53:25 ERROR:  tuplestore: write failed

> I run again the query an I get the same error.
> I check the disk space... everithing ok.

Disk space overrun would certainly be the most probable explanation.
Checking free space *after* the failure proves nothing at all, because
the temp files would have been released on failure.  You might try
running "df" at frequent intervals while the query is running to confirm
my guess that it's exhausting disk space.

As for *why* it's exhausting disk space, maybe you are doing an
unconstrained join between two large tables?  It's hard to guess when
you did not show us the failing query nor the schemas for the tables
it uses.

            regards, tom lane