On 29 February 2016 at 12:13, Igor Tandetnik <igor at tandetnik.org> wrote:
> On 2/28/2016 9:19 PM, Rowan Worth wrote: > >> On 27 February 2016 at 00:02, Igor Tandetnik <igor at tandetnik.org> wrote: > > > > I simplified to make the main point stand out: it is not true that the >> >>> database file remains "pristine" while the transaction is in progress, >>> and >>> changes are written only to the journal file. Instead, to the first >>> approximation, the opposite is true. >>> >> >> I agree it is not true in general, but it is mostly accurate for small >> transactions >> > > No, it's never true (at least, not with the rollback journal - WAL is > different still). Changes are not written to the journal; original > unmodified pages are. > You are of course entirely correct that changes are not written to the journal. I only meant the statement "the database file remains 'pristine' while the transaction in progress" is true for a small transaction, right up until commit time. Apologies if this discussion seems pointless/obvious from your perspective. My intent was to clarify the operation of rollback mode, as the original simplification made it sound like the main database file and journal are *immediately* modified during an INSERT/UPDATE/etc, rather than this step being deferred until COMMIT/cache-spill. Not sure if I've succeded :) -Rowan