Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1061C632C74 for ; Thu, 17 Jun 2010 16:01:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 17552-07 for ; Thu, 17 Jun 2010 19:01:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp1.hi-media-techno.com (smtp1.hi-media-techno.com [195.158.241.85]) by mail.postgresql.org (Postfix) with ESMTP id 2DFAB63218F for ; Thu, 17 Jun 2010 16:01:22 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 575053863CA; Thu, 17 Jun 2010 21:01:21 +0200 (CEST) Received: from smtp1.hi-media-techno.com ([127.0.0.1]) by localhost (smtp1.backbone.hi-media-techno.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E-1JVC+9YyX8; Thu, 17 Jun 2010 21:01:21 +0200 (CEST) Received: from mail1.hi-media-techno.com (unknown [192.168.27.17]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 0821893B93; Thu, 17 Jun 2010 21:01:21 +0200 (CEST) Received: from DimIMac.local (89-158-241-175.rev.dartybox.com [89.158.241.175]) by mail1.hi-media-techno.com (Postfix) with ESMTPSA id 9C2C12D807C; Thu, 17 Jun 2010 21:01:20 +0200 (CEST) Received: by DimIMac.local (Postfix, from userid 501) id 801069CCB6F; Thu, 17 Jun 2010 21:01:20 +0200 (CEST) From: Dimitri Fontaine To: Josh Berkus Cc: postgres performance list Subject: Re: PostgreSQL as a local in-memory cache Organization: Hi-Media References: <18287446-8677-46d6-a581-c4777f60ebda@40g2000pry.googlegroups.com> <4C1A5B81.8050908@agliodbs.com> User-Mail-Address: dfontaine@hi-media.com Date: Thu, 17 Jun 2010 21:01:19 +0200 In-Reply-To: <4C1A5B81.8050908@agliodbs.com> (Josh Berkus's message of "Thu, 17 Jun 2010 10:29:37 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201006/314 X-Sequence-Number: 39170 Hi, 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. Forcing the backend to care itself for writing the data I'm not sure is a good thing, but if you say so. Then you could have the GUC set for a whole cluster, only a database etc. We already have synchronous_commit to trade durability against performances, we could maybe support protect_data =3D off too. The d) point I'm not sure still applies if you have per transaction setting, which I think makes the most sense. The data you choose not to protect is missing at restart, just add some way to register a hook there. We already have one (shared_preload_libraries) but it requires coding in C.=20 Calling a user function at the end of recovery and before accepting connection would be good I think. A user function (per database) is better than a script because if you want to run it before accepting connections and still cause changes in the database=E2=80=A6 Regards, --=20 dim