Data Store Management

An RDS for PostgreSQL transaction holds row locks after an incorrect update. Which action releases its locks and discards its uncommitted changes?

Show the answer

Correct answerC. Roll back the transaction

AWhy not this: Vacuuming reclaims storage from dead tuples; it does not undo another transaction.

BWhy not this: Committing releases transaction locks but makes the incorrect update permanent.

CWhy this is right: Rolling back discards uncommitted updates and releases the transaction's locks.

DWhy not this: Analyzing updates planner statistics; it does not end the transaction or release its locks.

Rolling back ends the transaction, discards its uncommitted changes, and releases its locks. Committing also releases the locks but preserves the incorrect update.