Re: q re removal/recycling of WAL files

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>, pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: q re removal/recycling of WAL files
Date: 2021-11-03 23:38:12
Message-ID: 1f40f551ce8f21ea67e63fc357098c116cbcb1f0.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, 2021-11-03 at 16:24 -0600, Scott Ribe 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?

A WAL segment is deleted if it contains no record newer than the latest checkpoint
or the oldest replication slot, and it is archived (if enabled) and "wal_keep_size"
does not require it to be kept around.

That is the same for committed and rolled back operations.

> 2) Is there a chance that never-visible rows would be written into tables, bloating them?

Yes, that will definitely happen.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2021-11-04 00:57:18 Re: q re removal/recycling of WAL files
Previous Message Rui DeSousa 2021-11-03 23:37:45 Re: q re removal/recycling of WAL files