Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miPpN-00031V-8m for pgsql-admin@arkaria.postgresql.org; Wed, 03 Nov 2021 23:37:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miPpM-0007Fo-2n for pgsql-admin@arkaria.postgresql.org; Wed, 03 Nov 2021 23:37:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miPpL-0007Fd-PQ for pgsql-admin@lists.postgresql.org; Wed, 03 Nov 2021 23:37:55 +0000 Received: from impout007aa.msg.chrl.nc.charter.net ([47.43.20.31] helo=impout007.msg.chrl.nc.charter.net) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miPpF-0006YT-A7 for pgsql-admin@lists.postgresql.org; Wed, 03 Nov 2021 23:37:55 +0000 Received: from cerberus.crazybean.net ([71.11.29.254]) by cmsmtp with ESMTP id iPpCmuelkem8OiPpCmXLsp; Wed, 03 Nov 2021 23:37:46 +0000 Authentication-Results: crazybean.net; none X-Authority-Analysis: v=2.4 cv=fflod2cF c=1 sm=1 tr=0 ts=61831d4a a=GkUsAQdcAzAk0MT19QAIRQ==:117 a=GkUsAQdcAzAk0MT19QAIRQ==:17 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=vIxV3rELxO4A:10 a=YfQFs2c5AAAA:8 a=GA_a_Ee5xgRAWISuYOcA:9 a=QEXdDO2ut3YA:10 a=XXry1A_VxHPudjIMQgMN:22 Received: from smtpclient.apple ( [2001:470:e117:3:416d:b888:e1bc:caa8]) by cerberus.crazybean.net (OpenSMTPD) with ESMTPSA id 8acdfcf6 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 3 Nov 2021 19:37:45 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: q re removal/recycling of WAL files From: Rui DeSousa In-Reply-To: <4B485D8E-9692-4009-8562-43BC0E54C975@elevated-dev.com> Date: Wed, 3 Nov 2021 19:37:45 -0400 Cc: pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: <6F0CF776-AA45-4989-AF0D-084F57D74CD0@crazybean.net> References: <4B485D8E-9692-4009-8562-43BC0E54C975@elevated-dev.com> To: Scott Ribe X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CMAE-Envelope: MS4xfH1rOuqWHu+4VHJLYMU4xUIG5I67HQgYDa1Rc90CUEdlc+sw17CZ1mQd/6XFT8dpH/i2cKrTpfGoju+Wg6DWU/kzkVnSsFaFDqSTOFK8anq0xkYHX6ti c70JQiin0oQyNaF3u86pWVHpAPRWr6ugg9Z3iv/VOoTOuMuGdoJFaEhfEu7X6CLRtTtvK4IBZUBISKkPPuzQEWBzDJ8KOsTNXrGrOXtdDSS8mCD2gWNMkGlT C5YFwxvv6mxq+rPCTxFbiw== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Nov 3, 2021, at 6:24 PM, Scott Ribe = wrote: >=20 > 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.) >=20 > 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? >=20 WAL file can=E2=80=99t be recycled until it is no longer needed; thus = after a checkpoint and archived as well (if enabled).=20 > 2) Is there a chance that never-visible rows would be written into = tables, bloating them? >=20 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.=