O'Reilly logo

PostgreSQL Developer's Handbook by Hans-Jürgen Schönig, Ewald Geschwinde

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Understanding Transactions

Transactions are an interesting and useful feature of PostgreSQL. All sophisticated database systems offer some kind of transaction code these days.

When modifying data in a transaction-enabled database, the database uses some kind of “everything or nothing” algorithm. Imagine a DELETE statement that has to delete several thousand rows. If someone presses the reset button while the operation is running, you might run into trouble because only half of the table might have been deleted. You also might face integrity problems. To avoid such nasty occurrences, a highly sophisticated transaction-based system has been implemented in PostgreSQL.

Imagine a user starting a DELETE statement that affects millions of rows. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required