From: | Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru> |
---|---|
To: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
Cc: | legrand_legrand(at)hotmail(dot)com, michael(at)paquier(dot)xyz, Maksim Milyutin <milyutinma(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] PoC: custom signal handler for extensions |
Date: | 2022-09-02 05:06:10 |
Message-ID: | 8ee2ae87-25d9-16d5-4d67-dd81f4c3328c@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 1/12/18 20:51, Teodor Sigaev wrote:
>> In perspective, this mechanism provides the low-level instrument to
>> define remote procedure call on extension side. The simple RPC that
>> defines effective userid on remote backend (remote_effective_user
>> function) is attached for example.
> 7) Suppose, API allows to use different handlers in different processes
> for the same reason, it's could be reason of confusion. I suggest to
> restrict Register/Unregister call only for shared_preload_library, ie
> only during startup.
+1
>
> 8) I'd like to see an example of usage this API somewhere in contrib in
> exsting modules. Ideas?
I imagine, auto_explain could demonstrate usage of the API by
implementing logging of current query state, triggered by a signal. Most
of necessary code is already existed there.
Of course, this option will be enabled if auto_explain loads on startup.
But, maybe it breaks main concept of the auto_explain extension?
--
Regards
Andrey Lepikhov
Postgres Professional
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2022-09-02 05:09:02 | Re: Bug: Reading from single byte character column type may cause out of bounds memory reads. |
Previous Message | Kyotaro Horiguchi | 2022-09-02 04:16:05 | Re: test_decoding assertion failure for the loss of top-sub transaction relationship |