- Notifications
You must be signed in to change notification settings - Fork54
Stability Confirmation Methodology
Andrey Lepikhov edited this pageJul 12, 2022 ·9 revisions
To realize howstable AQO code is, before a release it should be tested according to the steps:
- make check,make check-world, of course.
- Stress test. See the bash script:
./configure --enable-tap-tests --enable-debug --enable-cassert >/dev/nullmake -j8 >/dev/nullmake check -C contrib/aqoecho "shared_preload_libraries='aqo'" >/tmp/extra.configecho "aqo.mode='intelligent'" >>/tmp/extra.configNO_TEMP_INSTALL=1 TEMP_CONFIG=/tmp/extra.config EXTRA_REGRESS_OPTS="--load-extension=aqo" make -k check-world
Here the PostgreSQL instance with AQO installed stressed by all queries from standard tests. It wouldn't stop on error but we can analyse them later. Also we look for core files, of course ).
- Don't forget to test on 32-bit hardware: this code uses many numbers and a number conversions.
- Use sanitizers:
CPPFLAGS="-O0 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fno-sanitize=nonnull-attribute -fno-sanitize=alignment -fstack-protector -Wall -Wno-unused-parameter -Wno-sign-compare" LDFLAGS='-fsanitize=address -fsanitize=undefined -static-libasan' ./configure --enable-debug --enable-cassert --enable-tap-tests --with-libxml --with-icu >/dev/null && make >/dev/null && make -C contrib >/dev/nullASAN_OPTIONS=detect_leaks=0:abort_on_error=1:disable_coredump=0:strict_string_checks=1:check_initialization_order=1:strict_init_order=1 make -C contrib/aqo check
Remember to usegcc
and clean object files from previous compilation.
- make installcheck in different modes of AQO.
- Join Order Benchmark - here we analyze speedup and convergency of an query execution time under control of AQO.
- sqlancer - be used then 'relocatable' feature will be implemented.
Sometimes, we can use AQO in some complex environment, like an ORM or a synthetic test bench. So, it's difficult to say when AQO works correctly, if no any cores found, of course :). Also, AQO tries to throw as little ERRORs as possible to not break DBMS and log strange situations. List of log messages for dubious situations:
- [AQO] Unexpected number of features for hash ...
- [AQO] different number depended oids for the same fss ...
- [AQO] Oid set for two records with equal fss %d don't match.
- [AQO] Does a collision happened? Check it if possible