On MacOS Monterey with LLVM 13.0.1 when executing export_prefix_check.sh
we get an error:
/usr/local/opt/llvm/bin/nm: error: : unknown argument '-defined-only',
did you mean '--defined-only'?
This patch adds a better check of which flag does `nm` expect.
Writing a shell script correctly can be hard even for a skilled
programmer. shellcheck is a static analysis tool that helps catch
common errors in shell scripts. We now have 36 executable scripts in
our repository, for which shellcheck reports 126 errors (calculated
like find . -type f -executable -exec bash -c '[ "$(file --brief
--mime-type "$1")" == "text/x-shellscript" ]' sh {} \; -exec shellcheck
-f gcc --exclude=SC2086 {} \; | cut -d: -f1 | sort | uniq | wc -l).
This commit fixes these warnings and adds a GitHub actions workflow
that runs shellcheck on all the executable shell scripts in the
repository. The warning SC2086: Double quote to prevent globbing and
word splitting is disabled globally, because it has little practical
consequences, sometimes leads to false positives, and is general is too
widespread because people forget to quote.
Change sanitizer test to run on PG12 and make it use the same
infrastructure as the other linux regression tests.
Co-authored-by: Sven Klemm <sven@timescale.com>
When building timescaledb on Ubuntu 20.04 mangle_path is present
as exported symbol in binaries, making the export prefix check fail.
This patch changes the export prefix check to ignore mangle_path.
This patch adjusts the export prefix check to exclude some symbols
present when using older toolchain and also includes gcov symbols
so export prefix check can be used on coverage enabled builds.
The INSERT and COPY paths have been refactored to better handle
differences between PostgreSQL versions. In particular, PostgreSQL 12
introduced the new table access mangement (AM) API which ties tuple
table slots to specific table AM implementations, requiring more
careful management of those data structures.
The code tries to adopt the new (PG12) API to the extent possible,
providing compatibility layers and functions for older PostgreSQL
versions where needed.
This commit makes four changes:
1. Adds the ts_ prefix to some functions that were missed in the last
pass
2. Adds static to some variables that were confined to a single file but
missing it
3. Adds the ability to disable using "hidden" visibility by default by
setting the USE_DEFAULT_VISIBILITY variable
4. Switches the prefix-check in travis to use the flag defined in 3 so
that the checker now checks all non-static symbols we define