Re: Temporary tablespaces on a RAM disk - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Temporary tablespaces on a RAM disk
Date
Msg-id aacb91da412d5a0c81327e973b7a145b50947435.camel@cybertec.at
Whole thread Raw
In response to Re: Temporary tablespaces on a RAM disk  ("Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com>)
Responses Re: Temporary tablespaces on a RAM disk  (Jerry Sievers <gsievers19@comcast.net>)
List pgsql-general
On Tue, 2020-03-17 at 19:57 +0000, Daniel Westermann (DWE) wrote:
> >> is someone using temporary tablespaces on a RAM disk ? Any experiences with that?
> >> I did some quick tests and checked the archives but could not find any
> >> information that either confirmed it is a bad idea nor the opposite.
> 
> >Taking a step back, wouldn't it be better to increase "work_mem"
> >and "temp_buffers" and set "temp_file_limit", so that temporary
> >files are avoided whenever possible and temporary tables are cached?
> 
> I don't think you can avoid that for all cases, especially when working
> with large data sets. That was one of the reasons for my initial question.

But with your proposed setup, any query that needs more temp space
than your RAM disk has will fail.  I don't think that is good for large
data sets.

Setting "work_mem" and "temp_buffers" high, you can use all the RAM
you have, and if it still is not enough, it spills to disk rather than die.

Yours,
Laurenz Albe




pgsql-general by date:

Previous
From: "Daniel Westermann (DWE)"
Date:
Subject: Re: Temporary tablespaces on a RAM disk
Next
From: Jerry Sievers
Date:
Subject: Re: Temporary tablespaces on a RAM disk