Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4b587f6
Fix misspelling in docs
hlinnaka Jul 8, 2026
16a4b3e
Fix replace_property_refs() ignoring the root of expression tree
petere Jul 8, 2026
57f93af
Resolve unknown-type literals in property expressions
petere Jul 8, 2026
5412abc
doc: Clarify pg_get_sequence_data() NULL-return cases
MasaoFujii Jul 8, 2026
3601f97
Add hints for sequence synchronization permission warnings
MasaoFujii Jul 8, 2026
bb7ded1
Introduce bms_offset_members() function
david-rowley Jul 8, 2026
ad7877b
Remove sketchy TerminateThread() call on Ctrl-C on Windows
hlinnaka Jul 8, 2026
842169b
Refactor how some aux processes advertise their ProcNumber
hlinnaka Jul 8, 2026
a4639d6
Whole-row fixes for ALTER COLUMN SET EXPRESSION
petere Jul 8, 2026
306d768
Move WAIT_FOR_WAL_* wait events from Client to IPC class
akorotkov Jul 8, 2026
8e0c252
Fix RETURNING OLD with BEFORE UPDATE trigger and concurrent update.
deanrasheed Jul 8, 2026
5e90e09
Remove the refint extension.
nathan-bossart Jul 8, 2026
881033a
Don't create SPLIT/MERGE partitions as internal relations
akorotkov Jul 8, 2026
b5d73d2
Tidy up datatype usage in test_random_offset_operations()
david-rowley Jul 8, 2026
ff076c0
doc: Fix data checksum progress reporting documentation
MasaoFujii Jul 9, 2026
e01b23b
Add an enable_groupagg GUC parameter
Jul 9, 2026
c1702cb
Doc: Clarify sequence synchronization commands.
Jul 9, 2026
df293ae
Reject incorrect range_bounds_histograms in stats import functions
michaelpq Jul 9, 2026
51ceb75
Fix outdated comment
petere Jul 9, 2026
2e65782
Prohibit locking clauses on GRAPH_TABLE
petere Jul 9, 2026
86ab7f4
JSON_TABLE PLAN clause
akorotkov Jul 9, 2026
dff789e
Fix advertising autovacuum launcher's ProcNumber
hlinnaka Jul 9, 2026
d293f03
ssl: Include limits.h to get INT_MAX when using LibreSSL
hlinnaka Jul 9, 2026
17accbe
libpq: Make error checks in the new buffer draining code more robust
hlinnaka Jul 9, 2026
8f7af12
Remove WaitEventCustomCounterData.
nathan-bossart Jul 9, 2026
21e958c
Bump catversion for JSON_TABLE PLAN clause
akorotkov Jul 9, 2026
999a841
Improve log_statement_max_length truncation reporting
MasaoFujii Jul 9, 2026
5594f20
Simplify truncate_query_log() callers
MasaoFujii Jul 9, 2026
54cd6fc
postgres_fdw: Remove SPI from postgresImportForeignStatistics.
Jul 10, 2026
dfce19c
Forbid FOR PORTION OF on views with INSTEAD OF triggers
petere Jul 10, 2026
701f021
postgres_fdw: Mark statistics import helpers as static
MasaoFujii Jul 10, 2026
e981025
Fix data checksum progress counter initialization
MasaoFujii Jul 10, 2026
97a18c2
Fix data checksum processing for temp relations and dropped databases
MasaoFujii Jul 10, 2026
c71d430
Don't lock tables in get_tables_to_repack()
alvherre Jul 10, 2026
c787c95
bufmgr: Fix order of operations in UnlockBufHdrExt
anarazel Jul 10, 2026
eed6c0d
Update FSM after updating VM on-access
melanieplageman Jul 10, 2026
e615da8
Fix for loop variables
petere Jul 11, 2026
5f14f82
Fix for loop variables used with lengthof
petere Jul 11, 2026
1c4b1de
Shorten pg_attribute_always_inline to pg_always_inline
tvondra Jul 11, 2026
2b8598a
Add recovery/startup test with backup_label and missing checkpoint se…
michaelpq Jul 13, 2026
1863452
Don't show tables redundantly when their schema is published.
Jul 13, 2026
7f77b2a
Some const qualifications added in passing
petere Jul 13, 2026
8ef9896
Move Windows ssize_t definition earlier
petere Jul 13, 2026
302222e
Clean up readlink() return type
petere Jul 13, 2026
1ae87df
Clean up copy_file_range() return type
petere Jul 13, 2026
7b87f08
Make blkreftable API use size_t/ssize_t consistently
petere Jul 13, 2026
8f71f64
Add recovery test for missing redo segment with backup_label
michaelpq Jul 13, 2026
d15a6bc
Replace __builtin_types_compatible_p with _Generic
petere Jul 14, 2026
af6fad8
Revert cascading of JSON_TABLE's ON ERROR
akorotkov Jul 14, 2026
160ef27
Fix JSON_TABLE PLAN deparse to keep parentheses around nested joins
akorotkov Jul 14, 2026
cd5fd08
Make JSON_TABLE generated path names avoid collisions
akorotkov Jul 14, 2026
4a82912
Fix and polish JSON_TABLE documentation
akorotkov Jul 14, 2026
6d8fd5a
Avoid redundant re-evaluation of JSON_TABLE nested paths
akorotkov Jul 14, 2026
9ee5241
Remove unreachable error check in JSON_TABLE plan transform
akorotkov Jul 14, 2026
e535445
postgres_fdw: don't push down non-relabeling ArrayCoerceExpr
akorotkov Jul 14, 2026
381b3cf
Revert "Rename routines for write/read of pgstats file"
michaelpq Jul 14, 2026
d68576b
Strip removed-relation references from PHVs in join clauses
Jul 15, 2026
8c551aa
Include check on polpermissive relcache for policies
michaelpq Jul 15, 2026
572c3b2
Rework pgstat_write_statsfile() in combination with to_serialized_data
michaelpq Jul 15, 2026
7d45a6d
Clean up secure_read()/secure_write() return type
petere Jul 15, 2026
ca326e9
Clean up read() return type
petere Jul 15, 2026
1f8c504
Clean up write() return type
petere Jul 15, 2026
01f78a8
Add assertion about ssize_t narrowing in AIO code
petere Jul 15, 2026
f38afa4
Reject concurrent sequence refreshes.
Jul 15, 2026
11ed011
Fix argument names in pg_clear_attribute_stats() errors
MasaoFujii Jul 15, 2026
7bce6fb
Add wait events for server logging destination writes
shinsj4653 May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 0 additions & 19 deletions config/c-compiler.m4
Original file line number Diff line number Diff line change
Expand Up @@ -267,25 +267,6 @@ fi])# PGAC_CXX_TYPEOF_UNQUAL



# PGAC_C_TYPES_COMPATIBLE
# -----------------------
# Check if the C compiler understands __builtin_types_compatible_p,
# and define HAVE__BUILTIN_TYPES_COMPATIBLE_P if so.
#
# We check usage with __typeof__, though it's unlikely any compiler would
# have the former and not the latter.
AC_DEFUN([PGAC_C_TYPES_COMPATIBLE],
[AC_CACHE_CHECK(for __builtin_types_compatible_p, pgac_cv__types_compatible,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[[ int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)]; ]])],
[pgac_cv__types_compatible=yes],
[pgac_cv__types_compatible=no])])
if test x"$pgac_cv__types_compatible" = xyes ; then
AC_DEFINE(HAVE__BUILTIN_TYPES_COMPATIBLE_P, 1,
[Define to 1 if your compiler understands __builtin_types_compatible_p.])
fi])# PGAC_C_TYPES_COMPATIBLE


# PGAC_C_BUILTIN_CONSTANT_P
# -------------------------
# Check if the C compiler understands __builtin_constant_p(),
Expand Down
30 changes: 0 additions & 30 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -15181,36 +15181,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF

fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
$as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
if ${pgac_cv__types_compatible+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

int
main ()
{
int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
pgac_cv__types_compatible=yes
else
pgac_cv__types_compatible=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
$as_echo "$pgac_cv__types_compatible" >&6; }
if test x"$pgac_cv__types_compatible" = xyes ; then

$as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
$as_echo_n "checking for __builtin_constant_p... " >&6; }
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,6 @@ PGAC_C_TYPEOF
PGAC_CXX_TYPEOF
PGAC_C_TYPEOF_UNQUAL
PGAC_CXX_TYPEOF_UNQUAL
PGAC_C_TYPES_COMPATIBLE
PGAC_C_BUILTIN_CONSTANT_P
PGAC_C_BUILTIN_OP_OVERFLOW
PGAC_C_BUILTIN_UNREACHABLE
Expand Down
6 changes: 3 additions & 3 deletions contrib/basic_archive/basic_archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ compare_files(const char *file1, const char *file2)

for (;;)
{
int nbytes = 0;
int buf1_len = 0;
int buf2_len = 0;
ssize_t nbytes = 0;
size_t buf1_len = 0;
size_t buf2_len = 0;

while (buf1_len < CMP_BUF_SIZE)
{
Expand Down
3 changes: 1 addition & 2 deletions contrib/dblink/dblink.c
Original file line number Diff line number Diff line change
Expand Up @@ -3151,9 +3151,8 @@ applyRemoteGucs(PGconn *conn)
};

int nestlevel = -1;
int i;

for (i = 0; i < lengthof(GUCsAffectingIO); i++)
for (size_t i = 0; i < lengthof(GUCsAffectingIO); i++)
{
const char *gucName = GUCsAffectingIO[i];
const char *remoteVal = PQparameterStatus(conn, gucName);
Expand Down
4 changes: 2 additions & 2 deletions contrib/hstore/expected/hstore.out
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ select count(*) from (select h from (select * from testhstore union all select *
(1 row)

set enable_hashagg = true;
set enable_sort = false;
set enable_groupagg = false;
select count(*) from (select h from (select * from testhstore union all select * from testhstore) hs group by h) hs2;
count
-------
Expand All @@ -1522,7 +1522,7 @@ select distinct * from (values (hstore '' || ''),('')) v(h);

(1 row)

set enable_sort = true;
set enable_groupagg = true;
-- btree
drop index hidx;
create index hidx on testhstore using btree (h);
Expand Down
4 changes: 2 additions & 2 deletions contrib/hstore/sql/hstore.sql
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@ select count(distinct h) from testhstore;
set enable_hashagg = false;
select count(*) from (select h from (select * from testhstore union all select * from testhstore) hs group by h) hs2;
set enable_hashagg = true;
set enable_sort = false;
set enable_groupagg = false;
select count(*) from (select h from (select * from testhstore union all select * from testhstore) hs group by h) hs2;
select distinct * from (values (hstore '' || ''),('')) v(h);
set enable_sort = true;
set enable_groupagg = true;

-- btree
drop index hidx;
Expand Down
4 changes: 2 additions & 2 deletions contrib/ltree/expected/ltree.out
Original file line number Diff line number Diff line change
Expand Up @@ -7891,7 +7891,7 @@ reset enable_seqscan;
reset enable_bitmapscan;
-- test hash aggregate
set enable_hashagg=on;
set enable_sort=off;
set enable_groupagg=off;
EXPLAIN (COSTS OFF)
SELECT count(*) FROM (
SELECT t FROM (SELECT * FROM ltreetest UNION ALL SELECT * FROM ltreetest) t1 GROUP BY t
Expand All @@ -7915,7 +7915,7 @@ SELECT t FROM (SELECT * FROM ltreetest UNION ALL SELECT * FROM ltreetest) t1 GRO
(1 row)

reset enable_hashagg;
reset enable_sort;
reset enable_groupagg;
drop index tstidx;
-- test gist index
create index tstidx on ltreetest using gist (t gist_ltree_ops(siglen=0));
Expand Down
4 changes: 2 additions & 2 deletions contrib/ltree/sql/ltree.sql
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ reset enable_bitmapscan;
-- test hash aggregate

set enable_hashagg=on;
set enable_sort=off;
set enable_groupagg=off;

EXPLAIN (COSTS OFF)
SELECT count(*) FROM (
Expand All @@ -384,7 +384,7 @@ SELECT t FROM (SELECT * FROM ltreetest UNION ALL SELECT * FROM ltreetest) t1 GRO
) t2;

reset enable_hashagg;
reset enable_sort;
reset enable_groupagg;

drop index tstidx;

Expand Down
5 changes: 2 additions & 3 deletions contrib/pageinspect/fsmfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ fsm_page_contents(PG_FUNCTION_ARGS)
StringInfoData sinfo;
Page page;
FSMPage fsmpage;
int i;

if (!superuser())
ereport(ERROR,
Expand All @@ -54,10 +53,10 @@ fsm_page_contents(PG_FUNCTION_ARGS)

initStringInfo(&sinfo);

for (i = 0; i < NodesPerPage; i++)
for (size_t i = 0; i < NodesPerPage; i++)
{
if (fsmpage->fp_nodes[i] != 0)
appendStringInfo(&sinfo, "%d: %d\n", i, fsmpage->fp_nodes[i]);
appendStringInfo(&sinfo, "%zu: %d\n", i, fsmpage->fp_nodes[i]);
}
appendStringInfo(&sinfo, "fp_next_slot: %d\n", fsmpage->fp_next_slot);

Expand Down
5 changes: 2 additions & 3 deletions contrib/pageinspect/hashfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,7 @@ hash_bitmap_info(PG_FUNCTION_ARGS)
int32 bitmappage,
bitmapbit;
HeapTuple tuple;
int i,
j;
int j;
Datum values[3];
bool nulls[3] = {0};
uint32 *freep;
Expand Down Expand Up @@ -456,7 +455,7 @@ hash_bitmap_info(PG_FUNCTION_ARGS)
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid overflow block number %u",
(BlockNumber) ovflblkno)));
for (i = 0; i < metap->hashm_nmaps; i++)
for (uint32 i = 0; i < metap->hashm_nmaps; i++)
if (metap->hashm_mapp[i] == ovflblkno)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
Expand Down
4 changes: 2 additions & 2 deletions contrib/pg_logicalinspect/pg_logicalinspect.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pg_get_logical_snapshot_info(PG_FUNCTION_ARGS)

arrayelems = (Datum *) palloc(ondisk.builder.committed.xcnt * sizeof(Datum));

for (int j = 0; j < ondisk.builder.committed.xcnt; j++)
for (size_t j = 0; j < ondisk.builder.committed.xcnt; j++)
arrayelems[j] = TransactionIdGetDatum(ondisk.builder.committed.xip[j]);

values[i++] = PointerGetDatum(construct_array_builtin(arrayelems,
Expand All @@ -187,7 +187,7 @@ pg_get_logical_snapshot_info(PG_FUNCTION_ARGS)

arrayelems = (Datum *) palloc(ondisk.builder.catchange.xcnt * sizeof(Datum));

for (int j = 0; j < ondisk.builder.catchange.xcnt; j++)
for (size_t j = 0; j < ondisk.builder.catchange.xcnt; j++)
arrayelems[j] = TransactionIdGetDatum(ondisk.builder.catchange.xip[j]);

values[i++] = PointerGetDatum(construct_array_builtin(arrayelems,
Expand Down
2 changes: 1 addition & 1 deletion contrib/pg_plan_advice/pgpa_identifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ pgpa_compute_rti_from_identifier(int rtable_length,
{
Index result = 0;

for (Index rti = 1; rti <= rtable_length; ++rti)
for (int rti = 1; rti <= rtable_length; ++rti)
{
pgpa_identifier *rti_rid = &rt_identifiers[rti - 1];

Expand Down
3 changes: 1 addition & 2 deletions contrib/pg_plan_advice/pgpa_join.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ pgpa_build_unrolled_join(pgpa_plan_walker_context *walker,
pgpa_join_unroller *join_unroller)
{
pgpa_unrolled_join *ujoin;
int i;

/*
* We shouldn't have gone even so far as to create a join unroller unless
Expand Down Expand Up @@ -260,7 +259,7 @@ pgpa_build_unrolled_join(pgpa_plan_walker_context *walker,
* the reverse of that order, so we need to flip the order of the arrays
* when constructing the final result.
*/
for (i = 0; i < join_unroller->nused; ++i)
for (unsigned i = 0; i < join_unroller->nused; ++i)
{
int k = join_unroller->nused - i - 1;

Expand Down
4 changes: 2 additions & 2 deletions contrib/pg_plan_advice/pgpa_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pgpa_output_advice(StringInfo buf, pgpa_plan_walker_context *walker,
* portion of the query didn't make it into the final plan.
*/
context.rid_strings = palloc0_array(const char *, rtable_length);
for (int i = 0; i < rtable_length; ++i)
for (Index i = 0; i < rtable_length; ++i)
if (rt_identifiers[i].alias_name != NULL)
context.rid_strings[i] = pgpa_identifier_string(&rt_identifiers[i]);

Expand Down Expand Up @@ -173,7 +173,7 @@ pgpa_output_unrolled_join(pgpa_output_context *context,
{
pgpa_output_join_member(context, &join->outer);

for (int k = 0; k < join->ninner; ++k)
for (unsigned k = 0; k < join->ninner; ++k)
{
pgpa_join_member *member = &join->inner[k];

Expand Down
2 changes: 1 addition & 1 deletion contrib/pg_plan_advice/pgpa_walker.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ pgpa_process_unrolled_join(pgpa_plan_walker_context *walker,
/* If this fails, we didn't unroll properly. */
Assert(ujoin->outer.unrolled_join == NULL);

for (int k = 0; k < ujoin->ninner; ++k)
for (unsigned k = 0; k < ujoin->ninner; ++k)
{
pgpa_join_member *member = &ujoin->inner[k];
Bitmapset *relids;
Expand Down
5 changes: 2 additions & 3 deletions contrib/pg_trgm/trgm_gist.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,9 @@ gtrgm_distance(PG_FUNCTION_ARGS)
static int32
unionkey(BITVECP sbase, TRGM *add, int siglen)
{
int32 i;

if (ISSIGNKEY(add))
{
int32 i;
BITVECP sadd = GETSIGN(add);

if (ISALLTRUE(add))
Expand All @@ -552,7 +551,7 @@ unionkey(BITVECP sbase, TRGM *add, int siglen)
trgm *ptr = GETARR(add);
int32 tmp = 0;

for (i = 0; i < ARRNELEM(add); i++)
for (unsigned i = 0; i < ARRNELEM(add); i++)
{
CPTRGM(&tmp, ptr + i);
HASH(sbase, tmp, siglen);
Expand Down
20 changes: 20 additions & 0 deletions contrib/postgres_fdw/deparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,26 @@ foreign_expr_walker(Node *node,
{
ArrayCoerceExpr *e = (ArrayCoerceExpr *) node;

/*
* Push down only when the per-element coercion is a plain
* relabeling, that is, elemexpr is a RelabelType or a bare
* CaseTestExpr. Any other element coercion -- a cast
* function, an I/O conversion (CoerceViaIO), or a domain
* coercion -- is kept local. We ship only a bare
* "arg::resulttype" cast (nothing at all for an
* implicit-format coercion), so a non-relabeling conversion
* would be re-resolved against the remote server's catalogs
* and session state and could silently change the result.
* This matches the handling of the scalar coercions for the
* I/O and domain cases (never shipped); an element cast
* function is kept local too, which is more conservative than
* the scalar case (a scalar cast function is shipped when it
* is shippable).
*/
if (!IsA(e->elemexpr, RelabelType) &&
!IsA(e->elemexpr, CaseTestExpr))
return false;

/*
* Recurse to input subexpression.
*/
Expand Down
Loading