pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Automating removal of orphaned stored procedure calls 2+ messages / 2 participants [nested] [flat]
* Automating removal of orphaned stored procedure calls @ 2022-07-12 16:58 John Scalia <jayknowsunix@gmail.com> 2022-07-12 17:10 ` Re: Automating removal of orphaned stored procedure calls Holger Jakobs <holger@jakobs.com> 0 siblings, 1 reply; 2+ messages in thread From: John Scalia @ 2022-07-12 16:58 UTC (permalink / raw) To: pgsql-admin@lists.postgresql.org One of our newer applications is regularly leaving some stored procedures in a partially completed state. It’s not one of my applications, and the DBA responsible for it hasn’t said why this happens, but he is trying to automate removing these. Currently, it’s a manual process where they log into the db as the application owner which owns these and remove them manually. For whatever reason he can’t use the application owner’s I’d to run this process. I suggested adding the application owner as a group for the actual user he is going to use, and once that happened, using a SET ROLE to become that user, but it did not apparently work. Anybody have any good ideas here to make this work? Sent from my iPad ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Automating removal of orphaned stored procedure calls 2022-07-12 16:58 Automating removal of orphaned stored procedure calls John Scalia <jayknowsunix@gmail.com> @ 2022-07-12 17:10 ` Holger Jakobs <holger@jakobs.com> 0 siblings, 0 replies; 2+ messages in thread From: Holger Jakobs @ 2022-07-12 17:10 UTC (permalink / raw) To: pgsql-admin@lists.postgresql.org Am 12.07.22 um 18:58 schrieb John Scalia: > One of our newer applications is regularly leaving some stored procedures in a partially completed state. It’s not one of my applications, and the DBA responsible for it hasn’t said why this happens, but he is trying to automate removing these. Currently, it’s a manual process where they log into the db as the application owner which owns these and remove them manually. For whatever reason he can’t use the application owner’s I’d to run this process. I suggested adding the application owner as a group for the actual user he is going to use, and once that happened, using a SET ROLE to become that user, but it did not apparently work. Anybody have any good ideas here to make this work? > Sent from my iPad (How nice you are advertising the device you are using. Is this relevant to your question?) I cannot see any connection between a transaction "hanging" and the usage of stored procedures. Of course it can happen anywhere, if a transaction is trying to update rows another transaction has updated without having completed. Try to find out by looking into pg_locks what is happening. -- Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 Attachments: OpenPGP_signature (application/pgp-signature, 202B) download ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-07-12 17:10 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-07-12 16:58 Automating removal of orphaned stored procedure calls John Scalia <jayknowsunix@gmail.com> 2022-07-12 17:10 ` Holger Jakobs <holger@jakobs.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox