N
N
NubasLol2021-07-29 21:04:06
PostgreSQL
NubasLol, 2021-07-29 21:04:06

What happens if the transaction is not committed?

What happens if I start a transaction in the code, but for some reason I can’t commit or rollback, what will happen in this case. Will this transaction hang forever and lock some of the data that was used in it? Or will postgres itself remove it at some point?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2021-07-29
@NubasLol

Will be rolled back at the end of the session (i.e. when the connection with the client is lost) or when the server is rebooted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question