Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory? - Mailing list pgsql-performance

From Jeff Janes
Subject Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Date
Msg-id CAMkU=1xfHkC6JuSMxYqXuK9gXr9b-_LxX-_0-zvywVMbrWwTjQ@mail.gmail.com
Whole thread Raw
In response to Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?  (Stefan Keller <sfkeller@gmail.com>)
List pgsql-performance
On Wed, Feb 29, 2012 at 7:28 AM, Stefan Keller <sfkeller@gmail.com> wrote:
> 2012/2/29 Stefan Keller <sfkeller@gmail.com>:
>> 2012/2/29 Jeff Janes <jeff.janes@gmail.com>:
>>>> It's quite possible the vacuum full is thrashing your disk cache due
>>>> to maintainance_work_mem. You can overcome this issue with the tar
>>>> trick, which is more easily performed as:
>>>>
>>>> tar cf /dev/null $PG_DATA/base
>>>
>>> But on many implementations, that will not work.  tar detects the
>>> output is going to the bit bucket, and so doesn't bother to actually
>>> read the data.
>>
>> Right.
>> But what about the commands cp $PG_DATA/base /dev/null or cat
>> $PG_DATA/base > /dev/null ?
>> They seem to do something.

For me they both give errors, because neither of them works on an
directory rather than ordinary files.

>
> ...or let's try /dev/zero instead /dev/null:
> tar cf /dev/zero $PG_DATA/base

That does seem to work.

So, does it solve your problem?

Cheers,

Jeff

pgsql-performance by date:

Previous
From: Peter van Hardenberg
Date:
Subject: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Next
From: Claudio Freire
Date:
Subject: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?