pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-performance@postgresql.org
Subject: Re: How to configure a read-only database server?
Date: Sun, 24 Apr 2011 14:37:17 +0200
Message-ID: <4DB4197D.3050105@fuzzy.cz> (raw)
In-Reply-To: <BANLkTinU2N_b3y2eqW6qULs-WgmbwHnDHg@mail.gmail.com>
References: <BANLkTinA9B=80cG8R=132RTxF52K=Mdfuw@mail.gmail.com>
	<0B4657E5-134C-409B-B0CC-A801F4299D7E@gmail.com>
	<BANLkTinU2N_b3y2eqW6qULs-WgmbwHnDHg@mail.gmail.com>

Dne 24.4.2011 11:38, Stefan Keller napsal(a):
> AFAIK it helps at least bulk loading my data every other time.

Yes, but this thread was about setting the DB for read-only workload, so
those settings were a bit strange.

> So I'm confused and backup again: Given a single-disk virtual Linux
> system and a 'read-only' dataset, which is exposed to the internet and
> completely replaced from time to time, and expecting SELECT queries
> including joins, sorts, equality and range (sub-)queries...
> 
> => What are the suggested postgresql.conf and session parameters for
> such a "read-only database" to "Whac-A-Mole" (i.e. to consider :->)?

What database size are we talking about? Does that fit into RAM or not?

If not, set large shared buffers and effective cache size appropriately.

If it fits into memory, you could lower the random_page_cost (but this
should be handled by the DB). Or you could create a ramdisk and use it
to store the data (in this case lowering random_page_cost makes much
more sense).

regards
Tomas



view thread (7+ messages)

Message-ID: <4DB4197D.3050105@fuzzy.cz>
Permalink:  ../4DB4197D.3050105@fuzzy.cz/
Also on:    postgresql.org/message-id/4DB4197D.3050105@fuzzy.cz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tv@fuzzy.cz
  Subject: Re: How to configure a read-only database server?
  In-Reply-To: <4DB4197D.3050105@fuzzy.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox