pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Klemme <shortcutter@googlemail.com>
To: Stefan Keller <sfkeller@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to configure a read-only database server?
Date: Tue, 19 Apr 2011 10:57:49 +0200
Message-ID: <BANLkTi=kTOyocpgEUTuZXRHvyg=Y506mHA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinA9B=80cG8R=132RTxF52K=Mdfuw@mail.gmail.com>
References: <BANLkTinA9B=80cG8R=132RTxF52K=Mdfuw@mail.gmail.com>

On Tue, Apr 19, 2011 at 12:08 AM, Stefan Keller <sfkeller@gmail.com> wrote:
> I browsed the faq and looked at PostgreSQL performance books but I
> could not find the obvious:
> How to configure a read-only database server?
>
> I have a single-disk virtual Linux system and a read-only dataset
> which is exposed to internet and completely replaced from time to
> time.
>
> This is what I found so far:
>
> * Disabling autovacuum daemon.

I guess this will give you only small benefits as the daemon won't
find any tables with modifications.

> * Setting postgresql.conf parameters:
>   fsync=off
>   synchronous_commit=off

Since you don't commit changes the effect of this might be small as well.

>   full_page_writes=off
>
> * For the session:
>   SET transaction_read_only TO FALSE;

Did you mean "TRUE"?

>   SET TRANSACTION READ ONLY;

What about

ALTER DATABASE x SET default_transaction_read_only = on;

?

> * What about wal_level and archive_mode?
>
> => Any comments on speeding up/optimizing such database server?

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/



view thread (7+ messages)  latest in thread

Message-ID: <BANLkTi=kTOyocpgEUTuZXRHvyg=Y506mHA@mail.gmail.com>
Permalink:  ../BANLkTi=kTOyocpgEUTuZXRHvyg=Y506mHA@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTi=kTOyocpgEUTuZXRHvyg=Y506mHA@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: shortcutter@googlemail.com, sfkeller@gmail.com
  Subject: Re: How to configure a read-only database server?
  In-Reply-To: <BANLkTi=kTOyocpgEUTuZXRHvyg=Y506mHA@mail.gmail.com>
  References: <BANLkTinA9B=80cG8R=132RTxF52K=Mdfuw@mail.gmail.com> <BANLkTi=kTOyocpgEUTuZXRHvyg=Y506mHA@mail.gmail.com>

* 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