postgresql/src/include
Andres Freund 909eebf27b dshash: revise sequential scan support.
The previous coding of dshash_seq_next(), on the first call, accessed
status->hash_table->size_log2 without holding a partition lock and without
guaranteeing that ensure_valid_bucket_pointers() had ever been called.

That oversight turns out to not have immediately visible effects, because
bucket 0 is always in partition 0, and ensure_valid_bucket_pointers() was
called after acquiring the partition lock.  However,
PARTITION_FOR_BUCKET_INDEX() with a size_log2 of 0 ends up triggering formally
undefined behaviour.

Simplify by accessing partition 0, without using PARTITION_FOR_BUCKET_INDEX().

While at it, remove dshash_get_current(), there is no convincing use
case. Also polish a few comments.

Author: Andres Freund <andres@anarazel.de>
Reviewed-By: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/CA+hUKGL9hY_VY=+oUK+Gc1iSRx-Ls5qeYJ6q=dQVZnT3R63Taw@mail.gmail.com
2022-04-04 14:32:52 -07:00
..
access Set relfrozenxid to oldest extant XID seen by VACUUM. 2022-04-03 09:57:21 -07:00
bootstrap Update copyright for 2022 2022-01-07 19:04:57 -05:00
catalog Add range_agg with multirange inputs 2022-03-30 20:16:23 +02:00
commands Set relfrozenxid to oldest extant XID seen by VACUUM. 2022-04-03 09:57:21 -07:00
common Allow parallel zstd compression when taking a base backup. 2022-03-30 09:41:26 -04:00
datatype Fix overflow hazards in interval input and output conversions. 2022-04-02 16:12:29 -04:00
executor JSON_TABLE 2022-04-04 16:03:47 -04:00
fe_utils Allow pgbench to retry in some cases. 2022-03-23 19:05:45 +09:00
foreign Update copyright for 2022 2022-01-07 19:04:57 -05:00
jit Update copyright for 2022 2022-01-07 19:04:57 -05:00
lib dshash: revise sequential scan support. 2022-04-04 14:32:52 -07:00
libpq Add system view pg_ident_file_mappings 2022-03-29 10:15:48 +09:00
mb Update copyright for 2022 2022-01-07 19:04:57 -05:00
nodes JSON_TABLE 2022-04-04 16:03:47 -04:00
optimizer Fix postgres_fdw to check shippability of sort clauses properly. 2022-03-31 14:29:48 -04:00
parser JSON_TABLE 2022-04-04 16:03:47 -04:00
partitioning Update copyright for 2022 2022-01-07 19:04:57 -05:00
port Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
portability Update copyright for 2022 2022-01-07 19:04:57 -05:00
postmaster Allow archiving via loadable modules. 2022-02-03 14:05:02 -05:00
regex Update copyright for 2022 2022-01-07 19:04:57 -05:00
replication Skip empty transactions for logical replication. 2022-03-30 07:41:05 +05:30
rewrite Update copyright for 2022 2022-01-07 19:04:57 -05:00
snowball Update copyright for 2022 2022-01-07 19:04:57 -05:00
statistics Add stxdinherit flag to pg_statistic_ext_data 2022-01-16 13:38:01 +01:00
storage Add new block-by-block strategy for CREATE DATABASE. 2022-03-29 11:48:36 -04:00
tcop Add support for MERGE SQL command 2022-03-28 16:47:48 +02:00
tsearch Update copyright for 2022 2022-01-07 19:04:57 -05:00
utils JSON_TABLE 2022-04-04 16:03:47 -04:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fmgr.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
funcapi.h Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
getaddrinfo.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
getopt_long.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Build in some knowledge about foreign-key relationships in the catalogs. 2021-02-02 17:11:55 -05:00
miscadmin.h Remove MaxBackends variable in favor of GetMaxBackends() function. 2022-02-08 15:53:19 -05:00
pg_config.h.in libpq: Allow IP address SANs in server certificates 2022-04-01 15:51:23 +02: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_manual.h Fix DROP {DATABASE,TABLESPACE} on Windows. 2022-02-12 10:21:23 +13:00
pg_getopt.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_trace.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat.h pgstat: remove some superflous comments from pgstat.h. 2022-04-04 14:23:02 -07:00
pgtar.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtime.h Fix overflow hazards in interval input and output conversions. 2022-04-02 16:12:29 -04:00
port.h Clean up messy API for src/port/thread.c. 2022-01-11 13:46:20 -05:00
postgres.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rusagestub.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
windowapi.h Update copyright for 2022 2022-01-07 19:04:57 -05:00