dev-db/postgresql does not have an apparent USE flag to enable configure --enable-debug. Enabling debug in postgresql configure is useful for a number of purposes, for example when writing c-language functions. Reproducible: Always Steps to Reproduce: 1. write a c-language function for postgresql. 2. connect gdb to a backend process for a client connection (gdb -p ####) 2a. connect via, for example, psql 2b. select pg_backend_pid(), obtain pid for step 2c. 2c. gdb -p #### 3. set a breakpoint within your c-language function 4. invoke your c-language function through your client connection Actual Results: gdb can't properly debug: (gdb) print *f value has been optimized out Expected Results: gdb can properly debug: (gdb) print *f $2 = {ids = 0x559a89e86198 "76", rule = 0x559a89e85e58 "<removed>", sql = 0x559a89e81530 "<removed>", group = 0x559a89e86080, id_list = 0x559a89e86180, id_cnt = 1}
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edcac752028d3a882dbc2f64e37e1e95dff21276 commit edcac752028d3a882dbc2f64e37e1e95dff21276 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2019-06-03 10:23:37 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2019-06-03 10:25:01 +0000 dev-db/postgresql: Multiple Fixes/Improvements Bump to EAPI 7. Use ver-cut instead of versionator. Preserve libpg{port,common}.a as they're needed by some PGXS builds. Add Python 3.7 support. Thanks to Jeff Kowalczyk for verifying. Allow ICU collations via icu USE flag. Add debug use flag to allow debugging of extensions. Bug: https://bugs.gentoo.org/671114 Bug: https://bugs.gentoo.org/571046 Bug: https://bugs.gentoo.org/685536 Package-Manager: Portage-2.3.62, Repoman-2.3.11 Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org> dev-db/postgresql/postgresql-10.8-r1.ebuild | 466 ++++++++++++++++++++++ dev-db/postgresql/postgresql-11.3-r1.ebuild | 468 ++++++++++++++++++++++ dev-db/postgresql/postgresql-12_beta1-r1.ebuild | 468 ++++++++++++++++++++++ dev-db/postgresql/postgresql-9.4.22-r1.ebuild | 480 +++++++++++++++++++++++ dev-db/postgresql/postgresql-9.5.17-r1.ebuild | 486 +++++++++++++++++++++++ dev-db/postgresql/postgresql-9.6.13-r1.ebuild | 491 ++++++++++++++++++++++++ dev-db/postgresql/postgresql-9999.ebuild | 20 +- 7 files changed, 2873 insertions(+), 6 deletions(-)