Re: PostgreSQL as a local in-memory cache

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: PostgreSQL as a local in-memory cache
Date: 2010-06-29 18:45:22
Message-ID: 201006291845.o5TIjMh24107@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> >>> I asked on IRC and was told it is true, and looking at the C code it
> >>> looks true. ?What synchronous_commit = false does is to delay writing
> >>> the wal buffers to disk and fsyncing them, not just fsync, which is
> >>> where the commit loss due to db process crash comes from.
>
> >> Ah, I see. Thanks.
>
> > I am personally surprised it was designed that way; I thought we would
> > just delay fsync.
>
> That would require writing and syncing to be separable actions. If
> you're using O_SYNC or similar, they aren't.

Ah, very good point. I have added a C comment to clarify why this is
the current behavior; attached and applied.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 1.5 KB

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Samuel Gendler 2010-06-29 21:00:43 ideal storage configuration
Previous Message Tom Lane 2010-06-29 17:27:34 Re: PostgreSQL as a local in-memory cache