aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/ci/pg_ci_base.conf2
-rwxr-xr-xsrc/tools/git_changelog1
-rwxr-xr-xsrc/tools/pgflex4
-rw-r--r--src/tools/pgindent/typedefs.list24
-rw-r--r--src/tools/testint128.c170
-rw-r--r--src/tools/valgrind.supp47
-rwxr-xr-xsrc/tools/version_stamp.pl2
7 files changed, 71 insertions, 179 deletions
diff --git a/src/tools/ci/pg_ci_base.conf b/src/tools/ci/pg_ci_base.conf
index 9cec5c2910d..695e0a0d6ec 100644
--- a/src/tools/ci/pg_ci_base.conf
+++ b/src/tools/ci/pg_ci_base.conf
@@ -10,5 +10,5 @@ log_autovacuum_min_duration = 0
log_checkpoints = true
log_connections = all
log_disconnections = true
-log_line_prefix = '%m [%p][%b] %q[%a][%v:%x] '
+log_line_prefix = '%m %b[%p] %q%a '
log_lock_waits = true
diff --git a/src/tools/git_changelog b/src/tools/git_changelog
index b8bd874f208..c25e399a87f 100755
--- a/src/tools/git_changelog
+++ b/src/tools/git_changelog
@@ -59,6 +59,7 @@ require IPC::Open2;
# (We could get this from "git branches", but not worth the trouble.)
# NB: master must be first!
my @BRANCHES = qw(master
+ REL_18_STABLE
REL_17_STABLE REL_16_STABLE REL_15_STABLE REL_14_STABLE REL_13_STABLE
REL_12_STABLE REL_11_STABLE REL_10_STABLE REL9_6_STABLE REL9_5_STABLE
REL9_4_STABLE REL9_3_STABLE REL9_2_STABLE REL9_1_STABLE REL9_0_STABLE
diff --git a/src/tools/pgflex b/src/tools/pgflex
index 3986b06874e..b8d9aa0086f 100755
--- a/src/tools/pgflex
+++ b/src/tools/pgflex
@@ -48,7 +48,7 @@ os.chdir(args.privatedir)
# contents. Set FLEX_TMP_DIR to the target private directory to avoid
# that. That environment variable isn't consulted on other platforms, so we
# don't even need to make this conditional.
-env = {'FLEX_TMP_DIR': args.privatedir}
+os.environ['FLEX_TMP_DIR'] = args.privatedir
# build flex invocation
command = [args.flex, '-o', args.output_file]
@@ -58,7 +58,7 @@ command += args.flex_flags
command += [args.input_file]
# create .c file from .l file
-sp = subprocess.run(command, env=env)
+sp = subprocess.run(command)
if sp.returncode != 0:
sys.exit(sp.returncode)
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 32d6e718adc..e6f2e93b2d6 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -55,9 +55,6 @@ AggStrategy
AggTransInfo
Aggref
AggregateInstrumentation
-AioWorkerControl
-AioWorkerSlot
-AioWorkerSubmissionQueue
AlenState
Alias
AllocBlock
@@ -74,6 +71,7 @@ AlterDatabaseSetStmt
AlterDatabaseStmt
AlterDefaultPrivilegesStmt
AlterDomainStmt
+AlterDomainType
AlterEnumStmt
AlterEventTrigStmt
AlterExtensionContentsStmt
@@ -521,7 +519,6 @@ CopyFormatOptions
CopyFromRoutine
CopyFromState
CopyFromStateData
-CopyHeaderChoice
CopyInsertMethod
CopyLogVerbosityChoice
CopyMethod
@@ -601,6 +598,7 @@ DR_intorel
DR_printtup
DR_sqlfunction
DR_transientrel
+DSMREntryType
DSMRegistryCtxStruct
DSMRegistryEntry
DWORD
@@ -805,6 +803,7 @@ FastPathStrongRelationLockData
FdwInfo
FdwRoutine
FetchDirection
+FetchDirectionKeywords
FetchStmt
FieldSelect
FieldStore
@@ -1289,6 +1288,7 @@ InjectionPointCacheEntry
InjectionPointCallback
InjectionPointCondition
InjectionPointConditionType
+InjectionPointData
InjectionPointEntry
InjectionPointSharedState
InjectionPointsCtl
@@ -1736,6 +1736,9 @@ Name
NameData
NameHashEntry
NamedArgExpr
+NamedDSAState
+NamedDSHState
+NamedDSMState
NamedLWLockTranche
NamedLWLockTrancheRequest
NamedTuplestoreScan
@@ -1756,6 +1759,7 @@ NonEmptyRange
Notification
NotificationList
NotifyStmt
+NotnullHashEntry
Nsrt
NtDllRoutine
NtFlushBuffersFileEx_t
@@ -1878,7 +1882,6 @@ PGTargetServerType
PGTernaryBool
PGTransactionStatusType
PGVerbosity
-PG_Locale_Strategy
PG_Lock_Status
PG_init_t
PGauthData
@@ -2176,8 +2179,12 @@ PgAioReturn
PgAioTargetData
PgAioTargetID
PgAioTargetInfo
+PgAioUringCaps
PgAioUringContext
PgAioWaitRef
+PgAioWorkerControl
+PgAioWorkerSlot
+PgAioWorkerSubmissionQueue
PgArchData
PgBackendGSSStatus
PgBackendSSLStatus
@@ -2268,6 +2275,7 @@ PlanInvalItem
PlanRowMark
PlanState
PlannedStmt
+PlannedStmtOrigin
PlannerGlobal
PlannerInfo
PlannerParamItem
@@ -2559,6 +2567,8 @@ RestrictInfo
Result
ResultRelInfo
ResultState
+RetainDeadTuplesData
+RetainDeadTuplesPhase
ReturnSetInfo
ReturnStmt
ReturningClause
@@ -3006,6 +3016,7 @@ Tcl_Obj
Tcl_Size
Tcl_Time
TempNamespaceStatus
+TestDSMRegistryHashEntry
TestDSMRegistryStruct
TestDecodingData
TestDecodingTxnData
@@ -3475,6 +3486,8 @@ bloom_filter
boolKEY
brin_column_state
brin_serialize_callback_type
+btree_gin_convert_function
+btree_gin_leftmost_function
bytea
cached_re_str
canonicalize_state
@@ -3744,6 +3757,7 @@ leafSegmentInfo
leaf_item
libpq_gettext_func
libpq_source
+libpqsrv_PGresult
line_t
lineno_t
list_sort_comparator
diff --git a/src/tools/testint128.c b/src/tools/testint128.c
deleted file mode 100644
index a25631e277d..00000000000
--- a/src/tools/testint128.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * testint128.c
- * Testbed for roll-our-own 128-bit integer arithmetic.
- *
- * This is a standalone test program that compares the behavior of an
- * implementation in int128.h to an (assumed correct) int128 native type.
- *
- * Copyright (c) 2017-2025, PostgreSQL Global Development Group
- *
- *
- * IDENTIFICATION
- * src/tools/testint128.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-/*
- * By default, we test the non-native implementation in int128.h; but
- * by predefining USE_NATIVE_INT128 to 1, you can test the native
- * implementation, just to be sure.
- */
-#ifndef USE_NATIVE_INT128
-#define USE_NATIVE_INT128 0
-#endif
-
-#include "common/int128.h"
-#include "common/pg_prng.h"
-
-/*
- * We assume the parts of this union are laid out compatibly.
- */
-typedef union
-{
- int128 i128;
- INT128 I128;
- union
- {
-#ifdef WORDS_BIGENDIAN
- int64 hi;
- uint64 lo;
-#else
- uint64 lo;
- int64 hi;
-#endif
- } hl;
-} test128;
-
-
-/*
- * Control version of comparator.
- */
-static inline int
-my_int128_compare(int128 x, int128 y)
-{
- if (x < y)
- return -1;
- if (x > y)
- return 1;
- return 0;
-}
-
-/*
- * Main program.
- *
- * Generates a lot of random numbers and tests the implementation for each.
- * The results should be reproducible, since we use a fixed PRNG seed.
- *
- * You can give a loop count if you don't like the default 1B iterations.
- */
-int
-main(int argc, char **argv)
-{
- long count;
-
- pg_prng_seed(&pg_global_prng_state, 0);
-
- if (argc >= 2)
- count = strtol(argv[1], NULL, 0);
- else
- count = 1000000000;
-
- while (count-- > 0)
- {
- int64 x = pg_prng_uint64(&pg_global_prng_state);
- int64 y = pg_prng_uint64(&pg_global_prng_state);
- int64 z = pg_prng_uint64(&pg_global_prng_state);
- test128 t1;
- test128 t2;
-
- /* check unsigned addition */
- t1.hl.hi = x;
- t1.hl.lo = y;
- t2 = t1;
- t1.i128 += (int128) (uint64) z;
- int128_add_uint64(&t2.I128, (uint64) z);
-
- if (t1.hl.hi != t2.hl.hi || t1.hl.lo != t2.hl.lo)
- {
- printf("%016lX%016lX + unsigned %lX\n", x, y, z);
- printf("native = %016lX%016lX\n", t1.hl.hi, t1.hl.lo);
- printf("result = %016lX%016lX\n", t2.hl.hi, t2.hl.lo);
- return 1;
- }
-
- /* check signed addition */
- t1.hl.hi = x;
- t1.hl.lo = y;
- t2 = t1;
- t1.i128 += (int128) z;
- int128_add_int64(&t2.I128, z);
-
- if (t1.hl.hi != t2.hl.hi || t1.hl.lo != t2.hl.lo)
- {
- printf("%016lX%016lX + signed %lX\n", x, y, z);
- printf("native = %016lX%016lX\n", t1.hl.hi, t1.hl.lo);
- printf("result = %016lX%016lX\n", t2.hl.hi, t2.hl.lo);
- return 1;
- }
-
- /* check multiplication */
- t1.i128 = (int128) x * (int128) y;
-
- t2.hl.hi = t2.hl.lo = 0;
- int128_add_int64_mul_int64(&t2.I128, x, y);
-
- if (t1.hl.hi != t2.hl.hi || t1.hl.lo != t2.hl.lo)
- {
- printf("%lX * %lX\n", x, y);
- printf("native = %016lX%016lX\n", t1.hl.hi, t1.hl.lo);
- printf("result = %016lX%016lX\n", t2.hl.hi, t2.hl.lo);
- return 1;
- }
-
- /* check comparison */
- t1.hl.hi = x;
- t1.hl.lo = y;
- t2.hl.hi = z;
- t2.hl.lo = pg_prng_uint64(&pg_global_prng_state);
-
- if (my_int128_compare(t1.i128, t2.i128) !=
- int128_compare(t1.I128, t2.I128))
- {
- printf("comparison failure: %d vs %d\n",
- my_int128_compare(t1.i128, t2.i128),
- int128_compare(t1.I128, t2.I128));
- printf("arg1 = %016lX%016lX\n", t1.hl.hi, t1.hl.lo);
- printf("arg2 = %016lX%016lX\n", t2.hl.hi, t2.hl.lo);
- return 1;
- }
-
- /* check case with identical hi parts; above will hardly ever hit it */
- t2.hl.hi = x;
-
- if (my_int128_compare(t1.i128, t2.i128) !=
- int128_compare(t1.I128, t2.I128))
- {
- printf("comparison failure: %d vs %d\n",
- my_int128_compare(t1.i128, t2.i128),
- int128_compare(t1.I128, t2.I128));
- printf("arg1 = %016lX%016lX\n", t1.hl.hi, t1.hl.lo);
- printf("arg2 = %016lX%016lX\n", t2.hl.hi, t2.hl.lo);
- return 1;
- }
- }
-
- return 0;
-}
diff --git a/src/tools/valgrind.supp b/src/tools/valgrind.supp
index 7ea464c8094..3880007dfb3 100644
--- a/src/tools/valgrind.supp
+++ b/src/tools/valgrind.supp
@@ -180,3 +180,50 @@
Memcheck:Cond
fun:PyObject_Realloc
}
+
+# NUMA introspection requires touching memory first, and some of it may
+# be marked as noacess (e.g. unpinned buffers). So just ignore that.
+{
+ pg_numa_touch_mem_if_required
+ Memcheck:Addr4
+ fun:pg_numa_touch_mem_if_required
+}
+
+{
+ pg_numa_touch_mem_if_required
+ Memcheck:Addr8
+ fun:pg_numa_touch_mem_if_required
+}
+
+
+# Memory-leak suppressions
+# Note that a suppression rule will silence complaints about memory blocks
+# allocated in matching places, but it won't prevent "indirectly lost"
+# complaints about blocks that are only reachable via the suppressed blocks.
+
+# Suppress complaints about stuff leaked during function cache loading.
+# Both the PL/pgSQL and SQL-function parsing processes generate some cruft
+# within the function's cache context, which doesn't seem worth the trouble
+# to get rid of. Moreover, there are cases where CachedFunction structs
+# are intentionally leaked because we're unsure if any fn_extra pointers
+# remain.
+{
+ hide_function_cache_leaks
+ Memcheck:Leak
+ match-leak-kinds: definite,possible,indirect
+
+ ...
+ fun:cached_function_compile
+}
+
+# Suppress complaints about stuff leaked during TS dictionary loading.
+# Not very much is typically lost there, and preventing it would
+# require a risky API change for TS tmplinit functions.
+{
+ hide_ts_dictionary_leaks
+ Memcheck:Leak
+ match-leak-kinds: definite,possible,indirect
+
+ ...
+ fun:lookup_ts_dictionary_cache
+}
diff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.pl
index c3509474d83..a9d2d0910f3 100755
--- a/src/tools/version_stamp.pl
+++ b/src/tools/version_stamp.pl
@@ -25,7 +25,7 @@ use warnings FATAL => 'all';
# Major version is hard-wired into the script. We update it when we branch
# a new development version.
-my $majorversion = 18;
+my $majorversion = 19;
# Validate argument and compute derived variables
my $minor = shift;