Only check pg_tde with the combined typedefs

The reason to do this is that the old approach created an unnecessary
diff against upstream where they had forgot SinglePartitionSpec in
typedefs.list.

Additionally add two new structs from our SMGR patch to the list.
This commit is contained in:
Andreas Karlsson 2025-04-11 05:13:19 +02:00 committed by Andreas Karlsson
parent 2131faf17d
commit 14a3d36ae1
4 changed files with 10 additions and 9 deletions

View File

@ -3,17 +3,12 @@
SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
cd "$SCRIPT_DIR/.."
if ! test -f src/backend/postgres; then
echo "src/backend/postgres doesn't exists, run make-build.sh first in debug mode"
exit 1
fi
if ! test -f contrib/pg_tde/pg_tde.so; then
echo "contrib/pg_tde/pg_tde.so doesn't exists, run make-build.sh first in debug mode"
exit 1
fi
src/tools/find_typedef src/backend contrib/pg_tde > percona.typedefs
src/tools/find_typedef contrib/pg_tde > pg_tde.typedefs
# Combine with original typedefs
cat percona.typedefs src/tools/pgindent/typedefs.list | sort -u > combined.typedefs
cat pg_tde.typedefs src/tools/pgindent/typedefs.list | sort -u > combined.typedefs

View File

@ -16,4 +16,8 @@ cd "$SCRIPT_DIR/.."
export PATH=$SCRIPT_DIR/../src/tools/pgindent/:$INSTALL_DIR/bin/:$PATH
pgindent --typedefs=combined.typedefs "$@" .
# Check everything except pg_tde with the list in the repo
pgindent --typedefs=src/tools/pgindent/typedefs.list --excludes=<(echo "contrib/pg_tde") "$@" .
# Check pg_tde with the fresh list extraxted from the object file
pgindent --typedefs=combined.typedefs "$@" contrib/pg_tde

View File

@ -1607,6 +1607,7 @@ ManyTestResourceKind
Material
MaterialPath
MaterialState
MdSMgrRelationData
MdfdVec
Memoize
MemoizeEntry
@ -3206,6 +3207,7 @@ XLogRecordBuffer
XLogRecoveryCtlData
XLogRedoAction
XLogSegNo
XLogSmgr
XLogSource
XLogStats
XLogwrtResult