pgsql: Set debug_query_string in worker_spi.

2020-10-31 Thread Noah Misch
Set debug_query_string in worker_spi.

This makes elog.c emit the string, which is good practice for a
background worker that executes SQL strings.

Reviewed by Tom Lane.

Discussion: https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/d2246cde825e4e1a85408390c66367b85b51a233

Modified Files
--
src/test/modules/worker_spi/worker_spi.c | 8 
1 file changed, 8 insertions(+)



pgsql: Reproduce debug_query_string==NULL on parallel workers.

2020-10-31 Thread Noah Misch
Reproduce debug_query_string==NULL on parallel workers.

Certain background workers initiate parallel queries while
debug_query_string==NULL, at which point they attempted strlen(NULL) and
died to SIGSEGV.  Older debug_query_string observers allow NULL, so do
likewise in these newer ones.  Back-patch to v11, where commit
7de4a1bcc56f494acbd0d6e70781df877dc8ecb5 introduced the first of these.

Discussion: https://postgr.es/m/[email protected]

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/0454666758209de2bdd96d5f0b9cf7aa055e4bda

Modified Files
--
src/backend/access/nbtree/nbtsort.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)



pgsql: Reproduce debug_query_string==NULL on parallel workers.

2020-10-31 Thread Noah Misch
Reproduce debug_query_string==NULL on parallel workers.

Certain background workers initiate parallel queries while
debug_query_string==NULL, at which point they attempted strlen(NULL) and
died to SIGSEGV.  Older debug_query_string observers allow NULL, so do
likewise in these newer ones.  Back-patch to v11, where commit
7de4a1bcc56f494acbd0d6e70781df877dc8ecb5 introduced the first of these.

Discussion: https://postgr.es/m/[email protected]

Branch
--
REL_13_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/ab2e2ce466683b6af5ec956106cd905380d3d349

Modified Files
--
src/backend/access/heap/vacuumlazy.c | 28 +++-
src/backend/access/nbtree/nbtsort.c  | 25 +
2 files changed, 36 insertions(+), 17 deletions(-)



pgsql: Reproduce debug_query_string==NULL on parallel workers.

2020-10-31 Thread Noah Misch
Reproduce debug_query_string==NULL on parallel workers.

Certain background workers initiate parallel queries while
debug_query_string==NULL, at which point they attempted strlen(NULL) and
died to SIGSEGV.  Older debug_query_string observers allow NULL, so do
likewise in these newer ones.  Back-patch to v11, where commit
7de4a1bcc56f494acbd0d6e70781df877dc8ecb5 introduced the first of these.

Discussion: https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/f90e80b9138355a51d2d5b5b63e1f89c4ba53325

Modified Files
--
src/backend/access/heap/vacuumlazy.c | 28 +++-
src/backend/access/nbtree/nbtsort.c  | 25 +
2 files changed, 36 insertions(+), 17 deletions(-)



pgsql: Reproduce debug_query_string==NULL on parallel workers.

2020-10-31 Thread Noah Misch
Reproduce debug_query_string==NULL on parallel workers.

Certain background workers initiate parallel queries while
debug_query_string==NULL, at which point they attempted strlen(NULL) and
died to SIGSEGV.  Older debug_query_string observers allow NULL, so do
likewise in these newer ones.  Back-patch to v11, where commit
7de4a1bcc56f494acbd0d6e70781df877dc8ecb5 introduced the first of these.

Discussion: https://postgr.es/m/[email protected]

Branch
--
REL_12_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/741b84e9f74726fbc97f63ddb46ab5675de98bdf

Modified Files
--
src/backend/access/nbtree/nbtsort.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)