Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A02B262D9C0 for ; Mon, 28 Jun 2010 18:57:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 57754-09 for ; Mon, 28 Jun 2010 21:57:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 5D1716346C5 for ; Mon, 28 Jun 2010 18:57:39 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o5SLvQ922390; Mon, 28 Jun 2010 17:57:26 -0400 (EDT) From: Bruce Momjian Message-Id: <201006282157.o5SLvQ922390@momjian.us> Subject: Re: PostgreSQL as a local in-memory cache In-Reply-To: <201006231940.o5NJe8Q05526@momjian.us> To: Bruce Momjian Date: Mon, 28 Jun 2010 17:57:25 -0400 (EDT) CC: Tom Lane , Dimitri Fontaine , Josh Berkus , postgres performance list X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/507 X-Sequence-Number: 39363 Bruce Momjian wrote: > Tom Lane wrote: > > Dimitri Fontaine writes: > > > Josh Berkus writes: > > >> a) Eliminate WAL logging entirely > > >> b) Eliminate checkpointing > > >> c) Turn off the background writer > > >> d) Have PostgreSQL refuse to restart after a crash and instead call an > > >> exteral script (for reprovisioning) > > > > > Well I guess I'd prefer a per-transaction setting, allowing to bypass > > > WAL logging and checkpointing. > > > > Not going to happen; this is all or nothing. > > > > > Forcing the backend to care itself for > > > writing the data I'm not sure is a good thing, but if you say so. > > > > Yeah, I think proposal (c) is likely to be a net loss. > > > > (a) and (d) are probably simple, if by "reprovisioning" you mean > > "rm -rf $PGDATA; initdb". Point (b) will be a bit trickier because > > there are various housekeeping activities tied into checkpoints. > > I think you can't actually remove checkpoints altogether, just > > skip the flush-dirty-pages part. > > Based on this thread, I have developed the following documentation patch > that outlines the performance enhancements possible if durability is not > required. The patch also documents that synchronous_commit = false has > potential committed transaction loss from a database crash (as well as > an OS crash). Applied. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. +