public inbox for [email protected]
help / color / mirror / Atom feedFrom: Thomas Güttler <[email protected]>
To: [email protected]
Subject: Log Stacktrace of current Python Interpreter via PostgreSQL trigger
Date: Mon, 20 May 2019 09:43:48 +0200
Message-ID: <[email protected]> (raw)
I am hunting a non reproducible in a production environment.
I can detect the buggy change in a postgres trigger.
Since it is production code I must no raise an exception. I can
only use logging.
If I could see the stacktrace of the python interpreter, I could
see which codes the change which I am hunting.
But how to get this interpreter stacktrace, if the condition is
detect in the db trigger?
https://stackoverflow.com/questions/51873708/log-stacktrace-of-python-in-postgresql-trigger
Maybe there is a psycopg2 feature which I don't know up to now.
I guess LISTEN+NOTIFY could get used.
Or setting a connection variable which I check after each SQL statement.
Ideas welcome,
Thomas Güttler
--
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Log Stacktrace of current Python Interpreter via PostgreSQL trigger
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox