Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E8FBB1337BA3 for ; Tue, 19 Apr 2011 05:58:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 72784-05 for ; Tue, 19 Apr 2011 08:57:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) by mail.postgresql.org (Postfix) with ESMTP id CAE1D1337B49 for ; Tue, 19 Apr 2011 05:57:49 -0300 (ADT) Received: by qyk7 with SMTP id 7so1514920qyk.19 for ; Tue, 19 Apr 2011 01:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=uy0+JFnj3GFMwDGAgXrvLKcJEw905uZzN4EmuvHo2og=; b=rLINUSeDE+SN2qb+TIXVDkilLY9HSzJX5IhA7F8vVzgohmhPJldnXj+HTKdfk4m0Fv OsE+UoJPWOmnvXibLm0HZNeH4UGxT1so+H7psHO7DVeETtGcvrBcLL/h6L9cwTS1kckJ Of+1ITQBQlbQU1+u9xtnopYRu0wEGLUB1ykHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=rA09zlnLhobJ+mZS6bCmkXiJyvtBH73fDPT1VGw4BW1lNVNUtZhNCdHvOq61PgpQJw LiOx9VO0ATZ4A9+10hWCG25P1rS/s0Xq6H1ds/Cl1f3WKufIe8e31S2VEKCyhRrA6Y58 inOKi1QDbeKYgW0t6kPRYvKgSywt7CKsjPJp8= MIME-Version: 1.0 Received: by 10.229.7.212 with SMTP id e20mr4125160qce.192.1303203469614; Tue, 19 Apr 2011 01:57:49 -0700 (PDT) Received: by 10.229.12.200 with HTTP; Tue, 19 Apr 2011 01:57:49 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 Apr 2011 10:57:49 +0200 Message-ID: Subject: Re: How to configure a read-only database server? From: Robert Klemme To: Stefan Keller Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201104/262 X-Sequence-Number: 43324 On Tue, Apr 19, 2011 at 12:08 AM, Stefan Keller 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: > =A0 fsync=3Doff > =A0 synchronous_commit=3Doff Since you don't commit changes the effect of this might be small as well. > =A0 full_page_writes=3Doff > > * For the session: > =A0 SET transaction_read_only TO FALSE; Did you mean "TRUE"? > =A0 SET TRANSACTION READ ONLY; What about ALTER DATABASE x SET default_transaction_read_only =3D on; ? > * What about wal_level and archive_mode? > > =3D> Any comments on speeding up/optimizing such database server? Kind regards robert --=20 remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/