From: | torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Kasahara Tatsuhito <kasahara(dot)tatsuhito(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Georgios Kokolatos <gkokolatos(at)protonmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Get memory contexts of an arbitrary backend process |
Date: | 2021-01-14 10:11:23 |
Message-ID: | 40c1a4b19ad03beacee2642a3cd61c14@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Since pg_get_target_backend_memory_contexts() waits to dump memory and
it could lead dead lock as below.
- session1
BEGIN; TRUNCATE t;
- session2
BEGIN; TRUNCATE t; -- wait
- session1
SELECT * FROM pg_get_target_backend_memory_contexts(<pid of session
2>); --wait
Thanks for notifying me, Fujii-san.
Attached v8 patch that prohibited calling the function inside
transactions.
Regards,
--
Atsushi Torikoshi
Attachment | Content-Type | Size |
---|---|---|
v8-0001-Add-pg_get_target_backend_memory_contexts-to-coll.patch | text/x-diff | 34.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Павел Еремин | 2021-01-14 10:14:27 | profiling |
Previous Message | Andrey Borodin | 2021-01-14 09:52:12 | Re: Yet another fast GiST build |