4 ms·
I won't comment on the OP using 'horrendous' as an adjective, but that quote seems misleading and unclear to me. Transactions (not transaction logs) are about m
by jodrellblank 2y ago
I won't comment on the OP using 'horrendous' as an adjective, but that quote seems misleading and unclear to me. Transactions (not transaction logs) are about maintaining [relational] database consistency, not directly about ensuring no data loss. A database engine would rather roll back a partially applied transaction and lose the data in it, than update one table and not update another, breaking the relation between them, and becoming inconsistent/corrupt.
Transaction logs then, are a separate record of these transactions into a log file. The quote says they are 'essential' but three paragraphs later in the link[0] is this: "The [log] mechanism was first implemented in version 7.1"; transaction logs are not essential for RDBMSs and are not essential for ensuring against data loss, they are one part of one larger design for reducing the chance of data loss. (Having a separate log file does not ensure that no data is lost in the event of a crash because the log file could also be lost by the same crash).
"so the database server can recover the database cluster" - the quote has switched from transaction logs as essential, to clustering-with-transaction-logs as essential, without clearly calling that out; there are clustering designs which don't need transaction logs so that isn't essential, and from the PostgreSQL documentation[1]: "It should be noted that log shipping is asynchronous, i.e., the [logs] are shipped after transaction commit. As a result, there is a window for data loss...". Neither transaction logs, nor log shipping clustering, are enough to ensure no data loss. It is possible to improve on that with synchronous_commit[2] (off by default in PostgreSQL) but that can still be designed badly to allow data loss to happen.
The quote is misleading about what transaction logs are for, what situations they can/cannot help with, and what other concerns are involved in guarding against data loss. Given that data loss is a particularly important concern in relational databases compared to some other software and systems, and that there are so many details which need to be considered to reduce risks of data loss, the quote being at all vague or misleading seems worse than it would be if writing about other systems, and worse than it would be if written in the context of 'a high level overview of databases'.
[0] http://www.interdb.jp/pg/pgsql09.html http://www.interdb.jp/pg/pgsql09.html
[1] https://www.postgresql.org/docs/17/warm-standby.html https://www.postgresql.org/docs/17/warm-standby.html
[2] https://www.postgresql.org/docs/17/warm-standby.html#SYNCHRONOUS-REPLICATION https://www.postgresql.org/docs/17/warm-standby.html#SYNCHRO...
- paulddraper 2y ago> Transactions (not transaction logs) are about maintaining [relational] database consistency, not directly about ensuring no data loss. That seems entirely consistent with that quote. Also, tangential.
- jodrellblank 2y ago"Transaction logs ensure no data loss" and "transaction logs do not ensure no data loss" cannot be entirely consistent with each other, they are opposites. Either they do ensure, or they don't. The quote says they do. They actually don't. That's not tangential that's fundamental.
- shxx 2y agoHas your need for approval been met?
- rrr_oh_man 2y agoResponding to criticism of one's work with ad hominems is something I'd rather have expected on Twitter... Why so angry?
- jodrellblank 2y agoNo, nobody approved of my comment; since you're concerned aobut that, can you upvote it please?