From: Rui DeSousa <rui@crazybean.net>
To: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: q re removal/recycling of WAL files
Date: Wed, 3 Nov 2021 19:37:45 -0400
Message-ID: <6F0CF776-AA45-4989-AF0D-084F57D74CD0@crazybean.net> (raw)
In-Reply-To: <4B485D8E-9692-4009-8562-43BC0E54C975@elevated-dev.com>
References: <4B485D8E-9692-4009-8562-43BC0E54C975@elevated-dev.com>
> On Nov 3, 2021, at 6:24 PM, Scott Ribe <scott_ribe@elevated-dev.com> wrote:
>
> Let's say that there's a big update as part of a migration, and that update times out, and the migration utility retries it several times. (Context is that sequence happened through automated utility, and filled the disk, leading to an unfortunate series of events.)
>
> 1) At what point does WAL from the failed & rolled back operations "go away"? During the next checkpoint? During the checkpoint after completion of all other transactions which overlapped time-wise with the timing-out ones?
>
WAL file can’t be recycled until it is no longer needed; thus after a checkpoint and archived as well (if enabled).
> 2) Is there a chance that never-visible rows would be written into tables, bloating them?
>
Yes, changes would be recorded into the tables; however, they would not be visible if the transaction was rolled back or aborted. A subsequent vacuum would remove those records and truncate the file to high water mark if possible.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rui@crazybean.net, scott_ribe@elevated-dev.com, pgsql-admin@lists.postgresql.org
Subject: Re: q re removal/recycling of WAL files
In-Reply-To: <6F0CF776-AA45-4989-AF0D-084F57D74CD0@crazybean.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox