Re: q re removal/recycling of WAL files

From: Rui DeSousa <rui(at)crazybean(dot)net>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: q re removal/recycling of WAL files
Date: 2021-11-03 23:37:45
Message-ID: 6F0CF776-AA45-4989-AF0D-084F57D74CD0@crazybean.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Nov 3, 2021, at 6:24 PM, Scott Ribe <scott_ribe(at)elevated-dev(dot)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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2021-11-03 23:38:12 Re: q re removal/recycling of WAL files
Previous Message Scott Ribe 2021-11-03 22:24:18 q re removal/recycling of WAL files