postgresql/src/include
Tom Lane 2040bb4a0b Clean up manipulations of hash indexes' hasho_flag field.
Standardize on testing a hash index page's type by doing
	(opaque->hasho_flag & LH_PAGE_TYPE) == LH_xxx_PAGE
Various places were taking shortcuts like
	opaque->hasho_flag & LH_BUCKET_PAGE
which while not actually wrong, is still bad practice because
it encourages use of
	opaque->hasho_flag & LH_UNUSED_PAGE
which *is* wrong (LH_UNUSED_PAGE == 0, so the above is constant false).
hash_xlog.c's hash_mask() contained such an incorrect test.

This also ensures that we mask out the additional flag bits that
hasho_flag has accreted since 9.6.  pgstattuple's pgstat_hash_page(),
for one, was failing to do that and was thus actively broken.

Also fix assorted comments that hadn't been updated to reflect the
extended usage of hasho_flag, and fix some macros that were testing
just "(hasho_flag & bit)" to use the less dangerous, project-approved
form "((hasho_flag & bit) != 0)".

Coverity found the bug in hash_mask(); I noted the one in
pgstat_hash_page() through code reading.
2017-04-14 17:04:25 -04:00
..
access Clean up manipulations of hash indexes' hasho_flag field. 2017-04-14 17:04:25 -04:00
bootstrap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
catalog Catversion bump 2017-04-14 14:24:01 -04:00
commands Identity columns 2017-04-06 08:41:37 -04:00
common Avoid using a C++ keyword in header file 2017-04-07 16:32:02 -04:00
datatype Consistently declare timestamp variables as TimestampTz. 2017-02-23 15:57:08 -05:00
executor Fix reporting of violations in ExecConstraints, again. 2017-04-10 12:20:08 -04:00
fe_utils Allow psql variable substitution to occur in backtick command strings. 2017-04-01 21:44:54 -04:00
foreign Allow custom and foreign scans to have shutdown callbacks. 2017-02-26 13:41:12 +05:30
lib Support hashed aggregation with grouping sets. 2017-03-27 04:20:54 +01:00
libpq Improve the SASL authentication protocol. 2017-04-13 19:34:16 +03:00
mb ICU support 2017-03-23 15:28:48 -04:00
nodes Avoid transferring parallel-unsafe subplans to parallel workers. 2017-04-12 16:07:00 -04:00
optimizer Optimize joins when the inner relation can be proven unique. 2017-04-07 22:20:13 -04:00
parser Identity columns 2017-04-06 08:41:37 -04:00
port Remove symbol WIN32_ONLY_COMPILER 2017-04-11 15:22:21 +02:00
portability Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Add an Assert() to max_parallel_workers enforcement. 2017-04-11 13:03:44 -04:00
regex Document intentional violations of header inclusion policy. 2017-03-08 17:01:13 -05:00
replication Make header self-contained 2017-04-13 21:47:24 -04:00
rewrite Remove deprecated COMMENT ON RULE syntax 2017-02-23 08:19:52 -05:00
snowball Document intentional violations of header inclusion policy. 2017-03-08 17:01:13 -05:00
statistics Collect and use multi-column dependency stats 2017-04-05 18:00:42 -04:00
storage Remove symbol WIN32_ONLY_COMPILER 2017-04-11 15:22:21 +02:00
tcop Remove dead code and fix comments in fast-path function handling. 2017-04-06 09:09:39 +03:00
tsearch Full Text Search support for json and jsonb 2017-03-31 14:26:03 -04:00
utils Add max_sync_workers_per_subscription to postgresql.conf.sample. 2017-04-12 00:10:54 +09:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
fmgr.h Remove support for version-0 calling conventions. 2017-03-30 06:25:46 -07:00
funcapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getaddrinfo.h Remove symbol WIN32_ONLY_COMPILER 2017-04-11 15:22:21 +02:00
getopt_long.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
miscadmin.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_config.h.in Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
pg_config.h.win32 Fix hardcoded typeof check result for Windows 2017-03-29 08:55:34 -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 Fix default minimum value for descending sequences 2017-01-23 14:00:58 -05:00
pg_getopt.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_trace.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgstat.h Add ProcArrayGroupUpdate wait event. 2017-04-07 13:41:47 -04:00
pgtar.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgtime.h Fix incorrect comment: pgtime's tm_mon is 1-based, not 0-based. 2017-01-24 09:36:17 -05:00
port.h Remove symbol WIN32_ONLY_COMPILER 2017-04-11 15:22:21 +02:00
postgres.h Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
postgres_ext.h Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
postgres_fe.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rusagestub.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
windowapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00