]> granicus.if.org Git - postgresql/commitdiff
No need to call XLogEnsureRecordSpace when the relation is unlogged.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 21 Nov 2014 13:13:15 +0000 (15:13 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 21 Nov 2014 13:13:15 +0000 (15:13 +0200)
Amit Kapila

src/backend/access/gin/ginfast.c

index fd81d675570f3f7d8a0fa7055b8f084a560eb2eb..f559a2f3d80e6aaa34b041e4643e5fec5d06e4a1 100644 (file)
@@ -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();