postgresql/src/backend/storage
Simon Riggs 9b013dc238 Improve performance of replay of AccessExclusiveLocks
A hot standby replica keeps a list of Access Exclusive locks for a top
level transaction. These locks are released when the top level transaction
ends. Searching of this list is O(N^2), and each transaction had to pay the
price of searching this list for locks, even if it didn't take any AE
locks itself.

This patch optimizes this case by having the master server track which
transactions took AE locks, and passes that along to the standby server in
the commit/abort record. This allows the standby to only try to release
locks for transactions which actually took any, avoiding the majority of
the performance issue.

Refactor MyXactAccessedTempRel into MyXactFlags to allow minimal additional
cruft with this.

Analysis and initial patch by David Rowley
Author: David Rowley and Simon Riggs
2017-03-22 13:09:36 +00:00
..
buffer Revert unintentional change in increasing usage count during pin of buffers, 2017-03-20 18:48:46 +03:00
file Create and use wait events for read, write, and fsync operations. 2017-03-18 07:43:01 -04:00
freespace Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
ipc Improve performance of replay of AccessExclusiveLocks 2017-03-22 13:09:36 +00:00
large_object Fix CatalogTupleInsert/Update abstraction for case of shared indstate. 2017-02-01 17:18:36 -05:00
lmgr Spelling fixes in code comments 2017-03-14 12:58:39 -04:00
page hash: Refactor bucket squeeze code. 2017-02-27 22:34:21 +05:30
smgr Create and use wait events for read, write, and fsync operations. 2017-03-18 07:43:01 -04:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00