Will using subtransactions will come back to bite me?
От | Kannan Goundan |
---|---|
Тема | Will using subtransactions will come back to bite me? |
Дата | |
Msg-id | CAM7aVoUYax62u8A49WLjOLOKqg8mLE-LzDThBZbC8=n9QQeyAw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Will using subtransactions will come back to bite me?
|
Список | pgsql-general |
I'm a backend web developer working on a pretty typical Postgres-backed web application. Each HTTP request is handled within a "SERIALIZABLE" transaction.
For some requests, we need to perform a sub-operation (which might fail) and record the success/failure in the DB. Subtransactions offer a simple way to do that -- the overall request is still wrapped in a transaction, and the sub-operation would be wrapped a subtransaction.
But a few things I've read online have made me wary of subtransactions:
I'd appreciate any pointers on how to determine whether a particular use of subtransactions will run into the issues described in the linked articles.
(I'm currently using Postgres 13.5 on GCP. Upgrading would require some effort, but I'm open to it!)
В списке pgsql-general по дате отправления: