Re: elog during holding a spinlock is safe?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Subject: Re: elog during holding a spinlock is safe?
Date: 2010-09-15 02:47:10
Message-ID: 24088.1284518830@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao <masao(dot)fujii(at)gmail(dot)com> writes:
> In HEAD, OwnLatch can elog during holding the spinlock WalSnd->mutex.
> This seems to be unsafe

Even if it were safe, holding a spinlock through non-straight-line code
is a complete violation of the spinlock coding rules re the length of
time you're supposed to hold the lock. Heikki?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-15 03:22:44 Re: top-level DML under CTEs
Previous Message Itagaki Takahiro 2010-09-15 02:32:32 Basic JSON support