Re: pgsql: Fix bug leading to restoring unlogged relations from empty files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix bug leading to restoring unlogged relations from empty files
Date: 2015-12-13 17:37:18
Message-ID: 27390.1450028238@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andres Freund <andres(at)anarazel(dot)de> writes:
> Fix bug leading to restoring unlogged relations from empty files.

Coverity thinks, quite correctly AFAICS, that this line you wrote in
FlushOneBuffer() is useless:

LWLockHeldByMe(bufHdr->content_lock);

Perhaps you meant

Assert(LWLockHeldByMe(bufHdr->content_lock));

?

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-12-13 17:57:25 Re: pgsql: Fix bug leading to restoring unlogged relations from empty files
Previous Message Magnus Hagander 2015-12-13 16:02:07 pgsql: Properly initialize write, flush and replay locations in walsend