From: Heikki Linnakangas Date: Fri, 21 Nov 2014 13:13:15 +0000 (+0200) Subject: No need to call XLogEnsureRecordSpace when the relation is unlogged. X-Git-Tag: REL9_5_ALPHA1~1169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=622983ea6964fc55f1ad3063d3d7b8f5de8e8816;p=postgresql No need to call XLogEnsureRecordSpace when the relation is unlogged. Amit Kapila --- diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c index fd81d67557..f559a2f3d8 100644 --- a/src/backend/access/gin/ginfast.c +++ b/src/backend/access/gin/ginfast.c @@ -552,7 +552,8 @@ shiftList(Relation index, Buffer metabuffer, BlockNumber newHead, * prepare the XLogInsert machinery for that before entering the * critical section. */ - XLogEnsureRecordSpace(data.ndeleted, 0); + if (RelationNeedsWAL(index)) + XLogEnsureRecordSpace(data.ndeleted, 0); START_CRIT_SECTION();