Re: q re removal/recycling of WAL files - Mailing list pgsql-admin

From Rui DeSousa
Subject Re: q re removal/recycling of WAL files
Date
Msg-id 6F0CF776-AA45-4989-AF0D-084F57D74CD0@crazybean.net
Whole thread Raw
In response to q re removal/recycling of WAL files  (Scott Ribe <scott_ribe@elevated-dev.com>)
Responses Re: q re removal/recycling of WAL files  (Scott Ribe <scott_ribe@elevated-dev.com>)
List pgsql-admin

> 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
retriesit several times. (Context is that sequence happened through automated utility, and filled the disk, leading to
anunfortunate series of events.) 
>
> 1) At what point does WAL from the failed & rolled back operations "go away"? During the next checkpoint? During the
checkpointafter 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
oraborted.  A subsequent vacuum would remove those records and truncate the file to high water mark if possible. 


pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: q re removal/recycling of WAL files
Next
From: Laurenz Albe
Date:
Subject: Re: q re removal/recycling of WAL files