Re: Question about concurrent synchronous and asynchronous commits

From: Dan Birken <birken(at)gmail(dot)com>
To: Vick Khera <vivek(at)khera(dot)org>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question about concurrent synchronous and asynchronous commits
Date: 2011-01-13 23:55:11
Message-ID: AANLkTik_MPnkuh63SDNGSncD5kYfD9ti406nD1PSZWNU@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok given your response, this is my understanding of how the WAL works:

When you begin a transaction, all your changes write to the in-memory WAL
buffer, and that buffer flushes to disk when:
a) Somebody commits a synchronous transaction
b) The WAL buffer runs out of space

Please correct me if I'm wrong.

-Dan

On Wed, Jan 12, 2011 at 12:32 PM, Vick Khera <vivek(at)khera(dot)org> wrote:

> On Wed, Jan 12, 2011 at 12:03 AM, Dan Birken <birken(at)gmail(dot)com> wrote:
> > If I commit asynchronously and then follow that with
> a synchronous commit,
> > does that flush the asynchronous commit as well?
>
> I'm pretty sure it does, because it has to flush the write-ahead log
> to disk, and there's only one. You can think of it as getting the
> flush for free from the first transaction, since the single flush
> covered the requirements of both transactions.
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-01-14 00:23:30 Re: Inconsistent time interval formatting
Previous Message Ben Chobot 2011-01-13 23:38:53 Re: Inconsistent time interval formatting