temp files getting me down

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: temp files getting me down
Date: 2011-05-25 16:31:23
Message-ID: 711BE244-0E32-4EC5-B1C2-34E2519245AD@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm running 9.0.3, and recently started getting temp files being created. This is a problem because it's making a bunch of dirty buffers that have to be flushed to disk and my poor little disk isn't up to the task. I'm not sure why though, because this is the explain verbose for the queries that are creating them:

QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.00..15180.05 rows=4000 width=109) (actual time=159.462..174.694 rows=4000 loops=1)
-> Index Scan using pending_replication_items on replication_queue (cost=0.00..37247114.20 rows=9814757 width=109) (actual time=159.459..169.061 rows=4000 loops=1)
Total runtime: 177.437 ms
(3 rows)

My understanding with temp files is that they are generated when sorts need to happen. But given that the index is doing all the sorting for me, I'm at a loss. Why else might I get temp files?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bosco Rama 2011-05-25 16:33:38 Re: Postgres 8.3.5 - ECPG and the use of descriptors and cursors in multi-threaded programs
Previous Message David Johnston 2011-05-25 16:19:51 Re: How to store and load images in PostgreSQL db?