mirror of
https://github.com/postgres/postgres.git
synced 2026-03-07 07:40:31 -05:00
There were two spots in pgstat_read_statsfile() where is was possible to
finish with a null-pointer-dereference crash for custom pgstats kinds:
- When reading stats for a fixed-numbered stats entry.
- When reading a variable stats entry with name serialization.
For both cases, these issues were reachable by starting a server after
changing shared_preload_libraries so as the stats written previously
could not be loaded.
The code is changed so as the stats are ignored in this case, like the
other code paths doing similar sanity checks. Two WARNINGs are added to
be able to debug these issues. A test is added for the case of
fixed-numbered stats with the module injection_points.
Oversights in
|
||
|---|---|---|
| .. | ||
| brin | ||
| commit_ts | ||
| delay_execution | ||
| dummy_index_am | ||
| dummy_seclabel | ||
| gin | ||
| injection_points | ||
| ldap_password_func | ||
| libpq_pipeline | ||
| plsample | ||
| spgist_name_ops | ||
| ssl_passphrase_callback | ||
| test_bloomfilter | ||
| test_copy_callbacks | ||
| test_custom_rmgrs | ||
| test_ddl_deparse | ||
| test_dsa | ||
| test_dsm_registry | ||
| test_extensions | ||
| test_ginpostinglist | ||
| test_integerset | ||
| test_json_parser | ||
| test_lfind | ||
| test_misc | ||
| test_oat_hooks | ||
| test_parser | ||
| test_pg_dump | ||
| test_predtest | ||
| test_radixtree | ||
| test_rbtree | ||
| test_regex | ||
| test_resowner | ||
| test_rls_hooks | ||
| test_shm_mq | ||
| test_slru | ||
| test_tidstore | ||
| unsafe_tests | ||
| worker_spi | ||
| xid_wraparound | ||
| Makefile | ||
| meson.build | ||
| README | ||
Test extensions and libraries ============================= src/test/modules contains PostgreSQL extensions that are primarily or entirely intended for testing PostgreSQL and/or to serve as example code. The extensions here aren't intended to be installed in a production server and aren't suitable for "real work". Furthermore, while you can do "make install" and "make installcheck" in this directory or its children, it is NOT ADVISABLE to do so with a server containing valuable data. Some of these tests may have undesirable side-effects on roles or other global objects within the tested server. "make installcheck-world" at the top level does not recurse into this directory. Most extensions have their own pg_regress tests or isolationtester specs. Some are also used by tests elsewhere in the tree. If you're adding new hooks or other functionality exposed as C-level API this is where to add the tests for it.