postgresql/src/include
Robert Haas f2e6a2ccf1 Add API to check if an existing exclusive lock allows cleanup.
LockBufferForCleanup() acquires a cleanup lock unconditionally, and
ConditionalLockBufferForCleanup() acquires a cleanup lock if it is
possible to do so without waiting; this patch adds a new API,
IsBufferCleanupOK(), which tests whether an exclusive lock already
held happens to be a cleanup lock.  This is possible because a cleanup
lock simply means an exclusive lock plus the assurance any other pins
on the buffer are newer than our own pin.  Therefore, just as the
existing functions decide that the exclusive lock that they've just
taken is a cleanup lock if they observe the pin count to be 1, this
new function allows us to observe that the pin count is 1 on a buffer
we've already locked.

This is useful in situations where a backend definitely wishes to
modify the buffer and also wishes to perform cleanup operations if
possible.  The patch to eliminate heavyweight locking by hash indexes
uses this, and it may have other applications as well.

Amit Kapila, per a suggestion from me.  Some comment adjustments by me
as well.
2016-11-04 09:32:24 -04:00
..
access Rename "pg_xlog" directory to "pg_wal". 2016-10-20 11:32:18 -04:00
bootstrap Update copyright for 2016 2016-01-02 13:33:40 -05:00
catalog Rename "pg_xlog" directory to "pg_wal". 2016-10-20 11:32:18 -04:00
commands Turn password_encryption GUC into an enum. 2016-09-28 12:22:44 +03:00
common Rename "pg_xlog" directory to "pg_wal". 2016-10-20 11:32:18 -04:00
datatype Be more careful about out-of-range dates and timestamps. 2016-03-16 19:09:28 -04:00
executor Use more efficient hashtable for execGrouping.c to speed up hash aggregation. 2016-10-14 17:22:51 -07:00
fe_utils Fix assorted places in psql to print version numbers >= 10 in new style. 2016-08-16 15:58:45 -04:00
foreign Fix typo in comment. 2016-10-18 13:43:27 -04:00
lib Avoid using a C++ keyword in header file 2016-10-26 22:41:56 -04:00
libpq Remove declarations for pq_putmessage_hook and pq_flush_hook. 2016-10-31 09:14:46 -04:00
mb Update copyright for 2016 2016-01-02 13:33:40 -05:00
nodes Use more efficient hashtable for execGrouping.c to speed up hash aggregation. 2016-10-14 17:22:51 -07:00
optimizer Speed up planner's scanning for parallel-query hazards. 2016-08-19 14:03:13 -04:00
parser Improve parser's and planner's handling of set-returning functions. 2016-09-13 13:54:24 -04:00
port Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
portability Update copyright for 2016 2016-01-02 13:33:40 -05:00
postmaster Rename "pg_xlog" directory to "pg_wal". 2016-10-20 11:32:18 -04:00
regex Make locale-dependent regex character classes work for large char codes. 2016-09-05 17:06:29 -04:00
replication Add conninfo to pg_stat_wal_receiver 2016-06-29 16:57:17 -04:00
rewrite Update copyright for 2016 2016-01-02 13:33:40 -05:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Add API to check if an existing exclusive lock allows cleanup. 2016-11-04 09:32:24 -04:00
tcop Stop the executor if no more tuples can be sent from worker to leader. 2016-06-06 14:52:58 -04:00
tsearch Final pgindent + perltidy run for 9.6. 2016-08-15 13:42:51 -04:00
utils Remove unnecessary int2vector-specific hash function and equality operator. 2016-10-12 14:54:08 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
c.h Add likely/unlikely() branch hint macros. 2016-10-14 16:05:30 -07:00
fmgr.h Revert addition of PGDLLEXPORT in PG_FUNCTION_INFO_V1 macro. 2016-10-12 18:01:43 -04:00
funcapi.h Widen query numbers-of-tuples-processed counters to uint64. 2016-03-12 16:05:29 -05:00
getaddrinfo.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
getopt_long.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
miscadmin.h Mark PostmasterPid as PGDLLIMPORT. 2016-06-03 14:06:35 -04:00
pg_config.h.in Fix building with LibreSSL. 2016-09-15 22:52:51 +03:00
pg_config.h.win32 Stamp HEAD as 10devel. 2016-08-15 13:49:49 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Add support for more extensive testing of raw_expression_tree_walker(). 2016-05-23 19:08:26 -04:00
pg_getopt.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_trace.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pgstat.h Fix typos in comments. 2016-10-26 11:12:31 +03:00
pgtar.h Allow pg_basebackup to stream transaction log in tar mode 2016-10-23 15:23:11 +02:00
pgtime.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
port.h Revert "Replace PostmasterRandom() with a stronger way of generating randomness." 2016-10-18 16:28:23 +03:00
postgres.h Be pickier about converting between Name and Datum. 2016-09-13 17:17:48 -04:00
postgres_ext.h Add a nonlocalized version of the severity field to client error messages. 2016-08-26 16:20:17 -04:00
postgres_fe.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
rusagestub.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
windowapi.h Update copyright for 2016 2016-01-02 13:33:40 -05:00