Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKKgb-000rb5-0S for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 18:40:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKKgZ-00DOW0-0E for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 18:39:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKKgY-00DOVn-2Q for pgsql-hackers@lists.postgresql.org; Tue, 05 May 2026 18:39:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wKKgR-00000000h9N-1I0N for pgsql-hackers@lists.postgresql.org; Tue, 05 May 2026 18:39:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 645Idorf669385 for ; Tue, 5 May 2026 14:39:50 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Prepping for annual pgindent run MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <669351.1778006353.0@sss.pgh.pa.us> Date: Tue, 05 May 2026 14:39:50 -0400 Message-ID: <669384.1778006390@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <669351.1778006353.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable I propose to do our annual pgindent run sometime pretty soon, perhaps next week after the minor-release dust has settled. One thing to be done is to update src/tools/pgindent/typedefs.list from the canonical list constructed by the buildfarm. We've been pretty good about maintaining that file manually, but not perfect, so this has a few small effects --- see attached for what that would look like today. I also propose applying the pgindent patches discussed in [1] and [2], which would have rather larger effects. [1] improves formatting of multiline comment blocks. 99% of the changes it would cause look like @@ -933,7 +933,8 @@ _PG_init(void) MarkGUCPrefixReserved("isn"); } = -/* isn_out +/* + * isn_out */ PG_FUNCTION_INFO_V1(isn_out); Datum While that's not that big a deal, it improves style uniformity since most of our multiline comments do not have any text on the first line. [2] adds a space between comma and an immediately following period, which mostly affects variadic functions: @@ -147,7 +147,7 @@ px_set_debug_handler(void (*handler) (const char *)) } = void -px_debug(const char *fmt,...) +px_debug(const char *fmt, ...) { va_list ap; It also helps a few struct constructors: @@ -62,7 +62,7 @@ struct RBTree = static RBTNode sentinel =3D { - .color =3D RBTBLACK,.left =3D RBTNIL,.right =3D RBTNIL,.parent =3D NULL + .color =3D RBTBLACK, .left =3D RBTNIL, .right =3D RBTNIL, .parent =3D NU= LL }; I don't see any places where it makes anything worse, and the improvement in variadic functions is quite pleasing IMO. So I think we should do that too. We also have pgperltidy, renumber_oids.pl, and copyright.pl to run sometime before beta1. Might as well do those at the same time. regards, tom lane [1] https://www.postgresql.org/message-id/flat/CAJ7c6TPQ0kkHQG-AqeAJ3PV_Yt= mDzcc7s+_V4=3Dt+xgSnZm1cFw@mail.gmail.com [2] https://www.postgresql.org/message-id/flat/c3327be8-09e2-46a1-88b4-228= a339d6916%40proxel.se ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="update-typedefs-list-20260505.patch"; charset="us-ascii" Content-ID: <669351.1778006353.2@sss.pgh.pa.us> Content-Description: update-typedefs-list-20260505.patch Content-Transfer-Encoding: quoted-printable diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-= secure-openssl.c index b978497b5d4..877851a73cd 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -62,7 +62,7 @@ typedef struct { uint32 status; const char *hostname; -} HostCacheEntry; +} HostCacheEntry; static uint32 host_cache_pointer(const char *key); #define SH_PREFIX host_cache #define SH_ELEMENT_TYPE HostCacheEntry diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalo= g/pg_db_role_setting.h index f1cbba020b2..55da8288a07 100644 --- a/src/include/catalog/pg_db_role_setting.h +++ b/src/include/catalog/pg_db_role_setting.h @@ -48,7 +48,7 @@ CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId)= BKI_SHARED_RELATION = END_CATALOG_STRUCT = -typedef FormData_pg_db_role_setting * Form_pg_db_role_setting; +typedef FormData_pg_db_role_setting *Form_pg_db_role_setting; = DECLARE_TOAST_WITH_MACRO(pg_db_role_setting, 2966, 2967, PgDbRoleSettingT= oastTable, PgDbRoleSettingToastIndex); = diff --git a/src/include/fe_utils/conditional.h b/src/include/fe_utils/con= ditional.h index 17b0ac837fb..2ed796b5c50 100644 --- a/src/include/fe_utils/conditional.h +++ b/src/include/fe_utils/conditional.h @@ -66,7 +66,7 @@ typedef struct IfStackElem typedef struct ConditionalStackData { IfStackElem *head; -} ConditionalStackData; +} ConditionalStackData; = typedef struct ConditionalStackData *ConditionalStack; = diff --git a/src/port/pqsignal.c b/src/port/pqsignal.c index dd43f9eb262..a8a1cd2074c 100644 --- a/src/port/pqsignal.c +++ b/src/port/pqsignal.c @@ -92,7 +92,7 @@ static volatile pqsigfunc pqsignal_handlers[PG_NSIG]; */ #if defined(USE_SIGACTION) && defined(USE_SIGINFO) static void -wrapper_handler(int postgres_signal_arg, siginfo_t * info, void *context) +wrapper_handler(int postgres_signal_arg, siginfo_t *info, void *context) #else /* no USE_SIGINFO */ static void wrapper_handler(int postgres_signal_arg) diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedef= s.list index 3ade7c08b6d..0b4fe8c1cfe 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -7,7 +7,6 @@ ASN1_OBJECT ASN1_OCTET_STRING ASN1_STRING ATAlterConstraint -AttrResultArgMap AV A_ArrayExpr A_Const @@ -184,6 +183,7 @@ AttrDefault AttrMap AttrMissing AttrNumber +AttrResultArgMap AttributeOpts AuthRequest AuthToken @@ -359,8 +359,6 @@ BufferAccessStrategy BufferAccessStrategyType BufferCacheOsPagesContext BufferCacheOsPagesRec -BufferCachePagesContext -BufferCachePagesRec BufferDesc BufferDescPadded BufferHeapTupleTableSlot @@ -458,7 +456,6 @@ ClosestMatchState Clump ClusterInfo ClusterParams -ClusterStmt CmdType CoalesceExpr CoerceParamHook @@ -515,6 +512,7 @@ ConcurrentChangeKind ConditionVariable ConditionVariableMinimallyPadded ConditionalStack +ConditionalStackData ConfigData ConfigVariable ConflictTupleInfo @@ -614,9 +612,7 @@ CustomScan CustomScanMethods CustomScanState CycleCtr -DataChecksumsWorkerOperation DBState -DbOidName DCHCacheEntry DEADLOCK_INFO DECountItem @@ -633,14 +629,14 @@ DSMREntryType DSMRegistryCtxStruct DSMRegistryEntry DWORD +DWORD64 DataChecksumsStateStruct DataChecksumsWorkerDatabase +DataChecksumsWorkerOperation DataChecksumsWorkerResult DataDirSyncMethod DataDumperPtr DataPageDeleteStack -DdlOptType -DdlOption DataTypesUsageChecks DataTypesUsageVersionCheck DatabaseInfo @@ -651,6 +647,9 @@ DatumTupleFields DbInfo DbInfoArr DbLocaleInfo +DbOidName +DdlOptType +DdlOption DeClonePtrType DeadLockState DeallocateStmt @@ -806,6 +805,7 @@ ExplainForeignModify_function ExplainForeignScan_function ExplainFormat ExplainOneQuery_hook_type +ExplainOptionGUCCheckHandler ExplainOptionHandler ExplainSerializeOption ExplainState @@ -832,7 +832,6 @@ ExtensionInfo ExtensionLocation ExtensionSiblingCache ExtensionVersionInfo -FastPathMeta FDWCollateState FD_SET FILE @@ -843,6 +842,7 @@ FSMPage FSMPageData FakeRelCacheEntry FakeRelCacheEntryData +FastPathMeta FastPathStrongRelationLockData FdwInfo FdwRoutine @@ -912,6 +912,7 @@ FormData_pg_collation FormData_pg_constraint FormData_pg_conversion FormData_pg_database +FormData_pg_db_role_setting FormData_pg_default_acl FormData_pg_depend FormData_pg_enum @@ -976,6 +977,7 @@ Form_pg_collation Form_pg_constraint Form_pg_conversion Form_pg_database +Form_pg_db_role_setting Form_pg_default_acl Form_pg_depend Form_pg_enum @@ -996,6 +998,11 @@ Form_pg_opfamily Form_pg_partitioned_table Form_pg_policy Form_pg_proc +Form_pg_propgraph_element +Form_pg_propgraph_element_label +Form_pg_propgraph_label +Form_pg_propgraph_label_property +Form_pg_propgraph_property Form_pg_publication Form_pg_publication_namespace Form_pg_publication_rel @@ -1267,6 +1274,7 @@ HeapTupleHeader HeapTupleHeaderData HeapTupleTableSlot HistControl +HostCacheEntry HostsFileLoadResult HostsLine HotStandbyState @@ -1293,6 +1301,7 @@ IfStackElem ImportForeignSchemaStmt ImportForeignSchemaType ImportForeignSchema_function +ImportForeignStatistics_function ImportQual InProgressEnt InProgressIO @@ -1325,7 +1334,6 @@ IndexElem IndexFetchHeapData IndexFetchTableData IndexInfo -IndexInsertState IndexList IndexOnlyScan IndexOnlyScanState @@ -1638,6 +1646,7 @@ LoadStmt LocalBufferLookupEnt LocalPgBackendStatus LocalTransactionId +Location LocationIndex LocationLen LockAcquireResult @@ -1881,6 +1890,7 @@ Offset OffsetNumber OffsetVarNodes_context Oid +Oid8 OidOptions OkeysState OldMultiXactReader @@ -2120,8 +2130,8 @@ PVIndVacStatus PVOID PVShared PVSharedCostParams -PVWorkerUsage PVWorkerStats +PVWorkerUsage PX_Alias PX_Cipher PX_Combo @@ -2517,6 +2527,7 @@ RTEPermissionInfo RWConflict RWConflictData RWConflictPoolHeader +RadixSortInfo Range RangeBound RangeBox @@ -2612,7 +2623,9 @@ RelocationBufferInfo RelptrFreePageBtree RelptrFreePageManager RelptrFreePageSpanLeader +RemoteAttributeMapping RemoteSlot +RemoteStatsResults RenameStmt ReopenPtrType ReorderBuffer @@ -2739,6 +2752,7 @@ SIZE_T SMgrRelation SMgrRelationData SMgrSortArray +SN_local SOCKADDR SOCKET SPELL @@ -2882,10 +2896,13 @@ ShellTypeInfo ShippableCacheEntry ShippableCacheKey ShmemAllocatorData +ShmemAttachCallback ShmemCallbacks -ShmemIndexEnt ShmemHashOpts +ShmemIndexEnt +ShmemInitCallback ShmemRequest +ShmemRequestCallback ShmemRequestKind ShmemStructOpts ShutdownForeignScan_function @@ -2987,9 +3004,9 @@ StartLOPtrType StartLOsPtrType StartReplicationCmd StartupStatusEnum +StatApproxReadStreamPrivate StatEntry StatExtEntry -StatApproxReadStreamPrivate StateFileChunk StatisticExtInfo StatsBuildData @@ -3053,6 +3070,7 @@ SyncRequestHandler SyncRequestType SyncStandbySlotsConfigData SyncingRelationsState +SysCacheIdentifier SysFKRelationship SysScanDesc SysScanDescData @@ -3642,6 +3660,7 @@ brin_column_state brin_serialize_callback_type btree_gin_convert_function btree_gin_leftmost_function +build_simple_rel_hook_type bytea cached_re_str canonicalize_state @@ -3801,7 +3820,6 @@ generate_series_timestamptz_fctx generate_subscripts_fctx get_attavgwidth_hook_type get_index_stats_hook_type -get_relation_info_hook_type get_relation_stats_hook_type gid_t gin_leafpage_items_state @@ -3839,6 +3857,7 @@ having_collation_ctx heap_page_items_state help_handler hlCheck +host_cache_hash hstoreCheckKeyLen_t hstoreCheckValLen_t hstorePairs_t @@ -3887,7 +3906,9 @@ itemIdCompact itemIdCompactData iterator jmp_buf +join_path_setup_hook_type join_search_hook_type +joinrel_setup_hook_type json_aelem_action json_manifest_error_callback json_manifest_per_file_callback @@ -3899,7 +3920,6 @@ json_scalar_action json_struct_action keepwal_entry keepwal_hash -keyEntryData key_t lclContext lclTocEntry @@ -3934,7 +3954,6 @@ mac8KEY macKEY macaddr macaddr8 -macaddr_sortsupport_state manifest_data manifest_file manifest_files_hash @@ -3959,7 +3978,6 @@ movedb_failure_params multirange_bsearch_comparison multirange_unnest_fctx mxact -mxtruncinfo needs_fmgr_hook_type network_sortsupport_state nl_item @@ -3996,7 +4014,6 @@ pe_test_vector pendingPosition pending_label pgParameterStatus -pgoff_t pg_atomic_flag pg_atomic_uint32 pg_atomic_uint64 @@ -4030,6 +4047,7 @@ pg_locale_t pg_mb_radix_tree pg_md5_ctx pg_on_exit_callback +pg_plan_advice_advisor_hook pg_prng_state pg_re_flags pg_regex_t @@ -4066,16 +4084,15 @@ pg_utf_to_local_combined pg_uuid_t pg_wchar pg_wchar_tbl +pgoff_t pgp_armor_headers_state pgpa_advice_item pgpa_advice_tag_type pgpa_advice_target pgpa_identifier pgpa_index_target -pgpa_index_type pgpa_itm_type pgpa_jo_outcome -pgpa_join_class pgpa_join_member pgpa_join_state pgpa_join_strategy @@ -4098,15 +4115,19 @@ pgpa_trove_lookup_type pgpa_trove_result pgpa_trove_slice pgpa_unrolled_join +pgpa_yy_extra_type pgsa_entry pgsa_entry_key pgsa_saved_entry pgsa_saved_stash pgsa_saved_stash_table_hash +pgsa_saved_stash_table_iterator pgsa_shared_state pgsa_stash pgsa_stash_count +pgsa_stash_count_table_hash pgsa_stash_name +pgsa_stash_name_table_hash pgsa_writer_context pgsocket pgsql_thing_t @@ -4154,6 +4175,7 @@ post_parse_analyze_hook_type postprocess_result_function pqbool pqsigfunc +pqsigfunc_legacy printQueryOpt printTableContent printTableFooter @@ -4189,7 +4211,6 @@ qc_hash_func qsort_arg_comparator qsort_comparator query_pathkeys_callback -RadixSortInfo rangeTableEntry_used_context rank_context rbt_allocfunc @@ -4221,11 +4242,9 @@ relopt_ternary relopt_type relopt_value relopts_validator -RemoteAttributeMapping remoteConn remoteConnHashEnt remoteDep -RemoteStatsResults remove_nulling_relids_context rendezvousHashEntry rep @@ -4270,6 +4289,7 @@ shmem_hash_allocator shmem_request_hook_type shmem_startup_hook_type sig_atomic_t +siginfo_t sigjmp_buf signedbitmapword sigset_t ------- =_aaaaaaaaaa0--