Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
81c0c77
Add missing include in Cluster.pm
michaelpq May 12, 2026
e3c4e37
Fix stale COPY progress during logical replication table sync
MasaoFujii May 13, 2026
5c00f4e
Add more tests for corrupted data with pglz_decompress()
michaelpq May 13, 2026
1de0a71
refint: Fix segfault in check_foreign_key().
nathan-bossart May 14, 2026
092b570
Re-add regression tests for ltree and intarray
michaelpq May 15, 2026
4c35d93
Doc: fix release-note typo.
tglsfdc May 15, 2026
510a05f
Use ereport(ERROR), not Assert(), for publisher tuples missing columns.
nmisch May 17, 2026
5552a15
pg_recvlogical: Honor source cluster file permissions for output files
MasaoFujii May 20, 2026
e18b771
Avoid exposing WAL receiver raw conninfo during timeline jumps
michaelpq May 22, 2026
7571026
Fix size check in statext_dependencies_deserialize()
michaelpq May 25, 2026
a96b051
Fix missed ReleaseVariableStats() in intarray's _int_matchsel().
tglsfdc May 25, 2026
8007d11
Fix race conditions in ProcKill()'s lock-group freelist handling
michaelpq May 27, 2026
db4d12f
Fix procLatch ownership race in ProcKill()
michaelpq May 27, 2026
2bb60eb
Fix self-deadlock when replaying WAL generated by older minor version
hlinnaka May 27, 2026
36b6ed2
Don't try to record dependency on a dropped column's datatype
hlinnaka May 27, 2026
5100bdb
Avoid orphaned objects dependencies
hlinnaka May 27, 2026
b67b2cd
Make stack depth check work with asan's use-after-return
anarazel May 28, 2026
d616e74
Use term "referenced" rather than "dependent" in dependency locking
hlinnaka May 28, 2026
74d3482
Fix copy-paste error in hash_record_extended()
michaelpq Jun 3, 2026
968c508
Fix race in ReplicationSlotRelease() for ephemeral slots
MasaoFujii Jun 3, 2026
7bdff3e
Fix another case of indirectly casting away const.
tglsfdc Jun 4, 2026
262cc4d
Improve reporting of invalid weight symbols in setweight() et al.
tglsfdc Jun 4, 2026
8bb935d
Fix off-by-one with NFC recomposition for Hangul U+11A7 (TBASE)
michaelpq Jun 4, 2026
5b72d02
refint: Remove plan cache.
nathan-bossart Jun 5, 2026
1eda3eb
pg_surgery: Fix off-by-one bug with heap offset
michaelpq Jun 5, 2026
a4ca91e
psql: Fix expanded aligned output
michaelpq Jun 8, 2026
9e8fd9f
ecpg: Reject multiple header items in GET/SET DESCRIPTOR
MasaoFujii Jun 8, 2026
673161b
doc: Expand on proper use of refint.
nathan-bossart Jun 8, 2026
64778fa
Fix missed checks for hashability of container-type equality.
tglsfdc Jun 8, 2026
1e04581
dict_synonym.c: remove incorrect outlen.
jeff-davis Jun 8, 2026
f3f901a
xml2: Fix crash with namespace nodes in xpath_nodeset()
michaelpq Jun 11, 2026
58b91fc
seg: Fix seg_out() to preserve the upper boundary's certainty indicator
hlinnaka Jun 11, 2026
41876c8
Fix handling of namespace nodes in xpath() (xml)
michaelpq Jun 12, 2026
e3a4e9e
doc: fix reference for finding replication slots to drop
MasaoFujii Jun 12, 2026
a17f39a
Update expected regression test output for xml_2.out
michaelpq Jun 12, 2026
086652c
Fix compilation with OpenSSL 4
danielgustafsson Jun 12, 2026
b31fa1f
Don't try to import a non-exported object in vcregress.pl
adunstan Jun 12, 2026
7974f94
Adjust cross-version upgrade tests for seg_out() fix
adunstan Jun 12, 2026
af09b18
amcheck: Use correct varlena size accessor in bt_normalize_tuple()
akorotkov Jun 13, 2026
b94996d
Doc: remove stale entry for removed aclitem[] ~ aclitem operator.
tglsfdc Jun 14, 2026
1026898
Trim regression test expected output for xml
michaelpq Jun 15, 2026
1b79c8d
Fix PQdescribePrepared with more than 7498 params
hlinnaka Jun 15, 2026
924172c
doc: Fix "Prev" link.
nathan-bossart Jun 15, 2026
2a00840
Clean up quoting of variable strings within replication commands.
tglsfdc Jun 15, 2026
f528a56
Fix int32 overflow in ltree_compare()
hlinnaka Jun 16, 2026
0939aad
logical decoding: Correctly free speculative insertion
alvherre Jun 16, 2026
d751464
Fix another instability in recovery TAP test 004_timeline_switch
michaelpq Jun 16, 2026
639fff5
jsonb_plperl, jsonb_plpython: Fix unguarded recursion and loops.
tglsfdc Jun 17, 2026
3640143
Report undefined jsonpath variable when no variables are supplied
amitlan Jun 18, 2026
1d216f1
doc: Fix "Prev" link, take 2.
nathan-bossart Jun 18, 2026
1f6b229
hstore_plperl: Add CHECK_FOR_INTERRUPTS() in reference-unwinding loop.
tglsfdc Jun 18, 2026
b2a6a27
Silence "may be used uninitialized" compiler warning.
nathan-bossart Jun 18, 2026
4b3bc6b
Make pg_mkdir_p() tolerant of a concurrent directory creation.
tglsfdc Jun 19, 2026
e8fbe5d
doc: Describe better handling of indexes in ALTER TABLE ATTACH PARTITION
michaelpq Jun 23, 2026
e520ad3
plperl: Fix NULL pointer dereference for forged array object
Jun 24, 2026
0b7719f
plpython: Fix NULL pointer dereferences for broken sequence and mappi…
Jun 29, 2026
309dc45
Use plpythonu in plpython tests added by commit 0b7719f74
Jun 29, 2026
255bce4
btree_gist: fix NaN handling in float4/float8 opclasses.
tglsfdc Jul 1, 2026
802dc79
Remove replication slot advice from MultiXact wraparound hints
MasaoFujii Jul 3, 2026
2d44bb9
psql: Fix \df tab completion for procedures
MasaoFujii Jul 3, 2026
286f9a3
Fix btree_gist's NotEqual strategy on internal index pages.
tglsfdc Jul 3, 2026
1b17a6e
Disallow renaming a rule to "_RETURN".
tglsfdc Jul 4, 2026
0115650
Prevent satisfies_hash_partition from crashing with VARIADIC NULL.
robertmhaas Jul 6, 2026
f59a592
pg_dump: check for _beginthreadex() failure in parallel dump
hlinnaka Jul 7, 2026
1b018b5
libpq: Extend "read pending" check from SSL to GSS
hlinnaka Jul 7, 2026
d3888c9
libpq: Drain all pending bytes from SSL/GSS during pqReadData()
hlinnaka Jul 7, 2026
1e8f393
doc: Fix typo in rule-system view example
MasaoFujii Jul 8, 2026
fd224fe
doc: Clarify COPY FROM WHERE expression restrictions
MasaoFujii Jul 8, 2026
f5f5697
ssl: Include limits.h to get INT_MAX when using LibreSSL
hlinnaka Jul 9, 2026
7532f21
libpq: Make error checks in the new buffer draining code more robust
hlinnaka Jul 9, 2026
5c1004b
Shorten pg_attribute_always_inline to pg_always_inline
tvondra Jul 11, 2026
99eb806
Include check on polpermissive relcache for policies
michaelpq Jul 15, 2026
e6e8277
doc: Fix log_parameter_max_length docs to reference log_min_duration_…
MasaoFujii Jul 16, 2026
2f4f193
Check CREATE_REPLICATION_SLOT response shape in libpqwalreceiver
MasaoFujii Jul 16, 2026
9d950d8
Push down join quals into lateral subqueries.
hlinnaka Jun 6, 2018
6752c38
WIP: Allow pushing join quals down into subqueries.
hlinnaka Jun 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/amcheck/verify_nbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2673,7 +2673,7 @@ bt_normalize_tuple(BtreeCheckState *state, IndexTuple itup)
ItemPointerGetOffsetNumber(&(itup->t_tid)),
RelationGetRelationName(state->rel))));
else if (!VARATT_IS_COMPRESSED(DatumGetPointer(normalized[i])) &&
VARSIZE(DatumGetPointer(normalized[i])) > TOAST_INDEX_TARGET &&
VARSIZE_ANY(DatumGetPointer(normalized[i])) > TOAST_INDEX_TARGET &&
(att->attstorage == TYPSTORAGE_EXTENDED ||
att->attstorage == TYPSTORAGE_MAIN))
{
Expand Down
59 changes: 42 additions & 17 deletions contrib/btree_gist/btree_float4.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,53 +24,70 @@ PG_FUNCTION_INFO_V1(gbt_float4_distance);
PG_FUNCTION_INFO_V1(gbt_float4_penalty);
PG_FUNCTION_INFO_V1(gbt_float4_same);

/*
* Use the NaN-aware comparators from utils/float.h, so that our results
* will agree with standard btree indexes. Note that penalty and distance
* functions below must also cope with NaNs, in particular with the policy
* that all NaNs are equal.
*/
static bool
gbt_float4gt(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float4 *) a) > *((const float4 *) b));
return float4_gt(*((const float4 *) a), *((const float4 *) b));
}
static bool
gbt_float4ge(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float4 *) a) >= *((const float4 *) b));
return float4_ge(*((const float4 *) a), *((const float4 *) b));
}
static bool
gbt_float4eq(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float4 *) a) == *((const float4 *) b));
return float4_eq(*((const float4 *) a), *((const float4 *) b));
}
static bool
gbt_float4le(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float4 *) a) <= *((const float4 *) b));
return float4_le(*((const float4 *) a), *((const float4 *) b));
}
static bool
gbt_float4lt(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float4 *) a) < *((const float4 *) b));
return float4_lt(*((const float4 *) a), *((const float4 *) b));
}

static int
gbt_float4key_cmp(const void *a, const void *b, FmgrInfo *flinfo)
{
float4KEY *ia = (float4KEY *) (((const Nsrt *) a)->t);
float4KEY *ib = (float4KEY *) (((const Nsrt *) b)->t);
int res;

if (ia->lower == ib->lower)
{
if (ia->upper == ib->upper)
return 0;

return (ia->upper > ib->upper) ? 1 : -1;
}

return (ia->lower > ib->lower) ? 1 : -1;
res = float4_cmp_internal(ia->lower, ib->lower);
if (res != 0)
return res;
return float4_cmp_internal(ia->upper, ib->upper);
}

static float8
gbt_float4_dist(const void *a, const void *b, FmgrInfo *flinfo)
{
return GET_FLOAT_DISTANCE(float4, a, b);
float8 arg1 = *(const float4 *) a;
float8 arg2 = *(const float4 *) b;
float8 r;

r = arg1 - arg2;
/* needn't consider isinf case here, must be due to input infinity */
if (unlikely(isnan(r)))
{
if (isnan(arg1) && isnan(arg2))
r = 0.0; /* treat NaNs as equal */
else if (isnan(arg1) || isnan(arg2))
r = get_float8_infinity(); /* max dist for NaN vs non-NaN */
else
r = 0.0; /* must be Inf - Inf case */
}
return fabs(r);
}


Expand Down Expand Up @@ -99,7 +116,15 @@ float4_dist(PG_FUNCTION_ARGS)

r = a - b;
CHECKFLOATVAL(r, isinf(a) || isinf(b), true);

if (unlikely(isnan(r)))
{
if (isnan(a) && isnan(b))
r = 0.0; /* treat NaNs as equal */
else if (isnan(a) || isnan(b))
r = get_float4_infinity(); /* max dist for NaN vs non-NaN */
else
r = 0.0; /* must be Inf - Inf case */
}
PG_RETURN_FLOAT4(Abs(r));
}

Expand Down Expand Up @@ -185,7 +210,7 @@ gbt_float4_penalty(PG_FUNCTION_ARGS)
float4KEY *newentry = (float4KEY *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(1))->key);
float *result = (float *) PG_GETARG_POINTER(2);

penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
float_penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);

PG_RETURN_POINTER(result);

Expand Down
52 changes: 35 additions & 17 deletions contrib/btree_gist/btree_float8.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,47 +25,49 @@ PG_FUNCTION_INFO_V1(gbt_float8_penalty);
PG_FUNCTION_INFO_V1(gbt_float8_same);


/*
* Use the NaN-aware comparators from utils/float.h, so that our results
* will agree with standard btree indexes. Note that penalty and distance
* functions below must also cope with NaNs, in particular with the policy
* that all NaNs are equal.
*/
static bool
gbt_float8gt(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float8 *) a) > *((const float8 *) b));
return float8_gt(*((const float8 *) a), *((const float8 *) b));
}
static bool
gbt_float8ge(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float8 *) a) >= *((const float8 *) b));
return float8_ge(*((const float8 *) a), *((const float8 *) b));
}
static bool
gbt_float8eq(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float8 *) a) == *((const float8 *) b));
return float8_eq(*((const float8 *) a), *((const float8 *) b));
}
static bool
gbt_float8le(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float8 *) a) <= *((const float8 *) b));
return float8_le(*((const float8 *) a), *((const float8 *) b));
}
static bool
gbt_float8lt(const void *a, const void *b, FmgrInfo *flinfo)
{
return (*((const float8 *) a) < *((const float8 *) b));
return float8_lt(*((const float8 *) a), *((const float8 *) b));
}

static int
gbt_float8key_cmp(const void *a, const void *b, FmgrInfo *flinfo)
{
float8KEY *ia = (float8KEY *) (((const Nsrt *) a)->t);
float8KEY *ib = (float8KEY *) (((const Nsrt *) b)->t);
int res;

if (ia->lower == ib->lower)
{
if (ia->upper == ib->upper)
return 0;

return (ia->upper > ib->upper) ? 1 : -1;
}

return (ia->lower > ib->lower) ? 1 : -1;
res = float8_cmp_internal(ia->lower, ib->lower);
if (res != 0)
return res;
return float8_cmp_internal(ia->upper, ib->upper);
}

static float8
Expand All @@ -77,7 +79,15 @@ gbt_float8_dist(const void *a, const void *b, FmgrInfo *flinfo)

r = arg1 - arg2;
CHECKFLOATVAL(r, isinf(arg1) || isinf(arg2), true);

if (unlikely(isnan(r)))
{
if (isnan(arg1) && isnan(arg2))
r = 0.0; /* treat NaNs as equal */
else if (isnan(arg1) || isnan(arg2))
r = get_float8_infinity(); /* max dist for NaN vs non-NaN */
else
r = 0.0; /* must be Inf - Inf case */
}
return Abs(r);
}

Expand Down Expand Up @@ -107,7 +117,15 @@ float8_dist(PG_FUNCTION_ARGS)

r = a - b;
CHECKFLOATVAL(r, isinf(a) || isinf(b), true);

if (unlikely(isnan(r)))
{
if (isnan(a) && isnan(b))
r = 0.0; /* treat NaNs as equal */
else if (isnan(a) || isnan(b))
r = get_float8_infinity(); /* max dist for NaN vs non-NaN */
else
r = 0.0; /* must be Inf - Inf case */
}
PG_RETURN_FLOAT8(Abs(r));
}

Expand Down Expand Up @@ -192,7 +210,7 @@ gbt_float8_penalty(PG_FUNCTION_ARGS)
float8KEY *newentry = (float8KEY *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(1))->key);
float *result = (float *) PG_GETARG_POINTER(2);

penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);
float_penalty_num(result, origentry->lower, origentry->upper, newentry->lower, newentry->upper);

PG_RETURN_POINTER(result);

Expand Down
15 changes: 13 additions & 2 deletions contrib/btree_gist/btree_utils_num.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,19 @@ gbt_num_consistent(const GBT_NUMKEY_R *key,
retval = tinfo->f_le(query, key->upper, flinfo);
break;
case BtreeGistNotEqualStrategyNumber:
retval = (!(tinfo->f_eq(query, key->lower, flinfo) &&
tinfo->f_eq(query, key->upper, flinfo)));
if (is_leaf)
retval = !(tinfo->f_eq(query, key->lower, flinfo));
else
{
/*
* If the upper/lower bounds are equal, then all entries below
* this node must have exactly that value. So we can avoid
* descending if the query equals both bounds. In all other
* cases, we must descend.
*/
retval = !(tinfo->f_eq(query, key->lower, flinfo) &&
tinfo->f_eq(query, key->upper, flinfo));
}
break;
default:
retval = false;
Expand Down
Loading
Loading