Open GeoffMontee opened 4 years ago
I will start working on this as soon as we get rid of CentOS6 for the testing (so we can only have systemd, which is already used by Ubuntu 18.04).
I will also need how this would work inside the docker containers we use. Most probably no big deal, but you never know :-)
It might be a nice improvement to our CI if were able to create core dumps when PostgreSQL crashes and also able to automatically extract back traces from them. This would probably make it easier to debug crashes like the one we saw in #213.
This idea was originally mentioned in #214 here: https://github.com/tds-fdw/tds_fdw/pull/214#issuecomment-541279407
This would probably require at least the changes listed below.
Changes Required in
ci-build
ci-build
compilestds_fdw
with the-ggdb
option specified inPG_CPPFLAGS
, so thattds_fdw
is built with debugging symbols.Changes Required in
ci-setup
ci-setup
installsdebuginfo
packages for PostgreSQL.For example:
ci-setup
grants unlimited size core dumps to the PostgreSQL process.For OSes that use systemd, that would probably look like this:
For other OSes, that would probably look like this:
ci-setup
sets up some other parameters related to core dumps.For example:
ci-setup
creates any paths that we depend on.For example:
Changes Required in
tds_fdw
tests/postgresql-tests.py
intds_fdw
to make it detect PostgreSQL crashes. Maybe it could scan the PostgreSQL log for lines like this?:tests/postgresql-tests.py
detects a PostgreSQL crash, then it would have to get the value ofkernel.core_pattern
:For example:
When
tests/postgresql-tests.py
has the value ofkernel.core_pattern
, it could check the path for core dumps.When
tests/postgresql-tests.py
finds a core dump, it could get all backtraces from it.For example: