Re: WalSndWakeup() and synchronous_commit=off

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WalSndWakeup() and synchronous_commit=off
Date: 2012-05-28 17:11:53
Message-ID: 8404.1338225113@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> Does anybody have a better idea than to either call WalSndWakeup() at
> essentially the wrong places or calling it inside a critical section?

> Tom, what danger do you see from calling it in a critical section?

My concern was basically that it might throw an error. Looking at the
current implementation of SetLatch, it seems that's not possible, but
I wonder whether we want to lock ourselves into that assumption.

Still, if the alternatives are worse, maybe that's the best answer.
If we do that, though, let's add comments to WalSndWakeup and SetLatch
mentioning that they mustn't throw error.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-05-28 17:45:31 Re: How could we make it simple to access the log as a table?
Previous Message Karl Denninger 2012-05-28 16:53:35 Re: Attempting to do a rolling move to 9.2Beta (as a slave) fails