Re: WalSndWakeup() and synchronous_commit=off - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: WalSndWakeup() and synchronous_commit=off
Date
Msg-id CAHGQGwG7RWv3Fbj6wYTtH2F891=BpsO7SvY-w4qmrrmtOp7Mew@mail.gmail.com
Whole thread Raw
In response to WalSndWakeup() and synchronous_commit=off  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: WalSndWakeup() and synchronous_commit=off
List pgsql-hackers
On Fri, May 11, 2012 at 4:51 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> diff --git a/src/backend/access/transam/xlog.c
> b/src/backend/access/transam/xlog.c
> index ecb71b6..7a3224b 100644
> --- a/src/backend/access/transam/xlog.c
> +++ b/src/backend/access/transam/xlog.c
> @@ -1906,6 +1906,10 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool
> xlog_switch)
>            xlogctl->LogwrtRqst.Flush = LogwrtResult.Flush;
>        SpinLockRelease(&xlogctl->info_lck);
>    }
> +
> +   /* the walsender wasn't woken up in xact.c */
> +   if(max_wal_senders > 1 && synchronous_commit == SYNCHRONOUS_COMMIT_OFF)
> +       WalSndWakeup();
>  }

Calling WalSndWakeup() while WALWriteLock is being held might cause another
performance degradation. No?

Regards,

--
Fujii Masao


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: unite recovery.conf and postgresql.conf
Next
From: "David E. Wheeler"
Date:
Subject: Re: PL/perl elog(ERROR) Does not Abort Transaction