Hi, Applied your patch (but not using -fno-omit-frame-pointer). It seems recover the perf loss: 55659.72 notpm. FWIW, the profile is below. I will do a run with the flag.. Samples: 598K of event 'cycles', Event count (approx.): 6568957160059
+ 4.03% postgres postgres [.] hash_search_with_hash_value + 3.74% postgres postgres [.] heap_hot_search_buffer + 3.17% postgres postgres [.] LWLockAcquire + 2.92% postgres postgres [.] _bt_compare + 2.64% postgres postgres [.] PinBuffer + 2.62% postgres postgres [.] AllocSetAlloc + 2.34% postgres postgres [.] XLogInsert + 2.27% postgres postgres [.] SearchCatCache + 1.81% postgres postgres [.] HeapTupleSatisfiesMVCC + 1.52% postgres postgres [.] ExecInitExpr + 1.45% postgres postgres [.] heap_page_prune_opt + 1.41% swapper [kernel.kallsyms] [k] intel_idle + 1.30% postgres postgres [.] LWLockRelease + 1.12% postgres postgres [.] heapgetpage + 0.96% postgres libc-2.17.so [.] _int_malloc + 0.86% postgres libc-2.17.so [.] __memcpy_ssse3_back + 0.84% postgres postgres [.] hash_any + 0.81% postgres postgres [.] MemoryContextAllocZeroAligned + 0.76% postgres postgres [.] XidInMVCCSnapshot + 0.74% postgres postgres [.] _bt_checkkeys + 0.70% postgres postgres [.] fmgr_info_cxt_security + 0.70% postgres postgres [.] FunctionCall2Coll + 0.66% postgres libc-2.17.so [.] __strncpy_sse2_unaligned + 0.63% postgres postgres [.] tbm_iterate + 0.58% postgres postgres [.] base_yyparse + 0.58% postgres libc-2.17.so [.] __printf_fp + 0.55% postgres postgres [.] palloc + 0.51% postgres postgres [.] TransactionIdPrecedes + 0.51% postgres postgres [.] slot_deform_tuple + 0.50% postgres postgres [.] ReadBuffer_common