0

Please accept my apologies for the basic question but I can't seem to find the answer to this basic question online.

I have a few triggers on my Postgres database that run on insert/update and I'm wondering if the database releases the connection to my server application after the triggering sql or after the trigger completes? Makes sense to me that the database would release the connection on completion of the triggering sql, am I right??

1 Answer 1

1

The statement returns success/failure only once all triggers have run to completion.

The database doesn't hold a connection to the server. It's the opposite. The server releases connection to the database (back to a pool, usually) once it's done with using it, usually after completion of a transaction. In the simplest case that's a single statement.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.