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 1miPpi-00032s-Uz for pgsql-admin@arkaria.postgresql.org; Wed, 03 Nov 2021 23:38:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miPph-0002ZR-Tb for pgsql-admin@arkaria.postgresql.org; Wed, 03 Nov 2021 23:38:17 +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 1miPph-0002ZE-Gs for pgsql-admin@lists.postgresql.org; Wed, 03 Nov 2021 23:38:17 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1miPpe-0006Ym-Mn for pgsql-admin@lists.postgresql.org; Wed, 03 Nov 2021 23:38:17 +0000 Received: by mail-wm1-x32c.google.com with SMTP id a20-20020a1c7f14000000b003231d13ee3cso5864239wmd.3 for ; Wed, 03 Nov 2021 16:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=vz7Hc9eosas5beQ7UpS0wY+IyVhYJMmclItu9H4V8Qg=; b=sJohWiU76fgJy4ds2DtD5TKa05dYTxmukVnLixYsit15vRHby2LyVluVeBeyZiiVaF izWNtJ3jFO0tl8RBbr3haX01PTXzZ9VgSeJFtKnswPyktzuLb8cvUI0bNluwOmXIjWFx 4BJawLxb5WLB8yJwlOXLaZpA+1gbQYpuzOrfMOUUAQWtXTkaqijmBLA18689XIbGakYW rgz1kmPXv7GLLy008I1qByHp373io8geoXY4yqFqdt3m5oGl9W+mvQq3Q5Se1rHi1T4b zuYPLezZfxvgdAHNdi5lo7eQFSEOVQ8o8lyuWfHfSKFoQvb6hJP4GlEnjThBi1QeABKT +9Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=vz7Hc9eosas5beQ7UpS0wY+IyVhYJMmclItu9H4V8Qg=; b=cNSbMA23JYdiJUCUWebEnqjbwC90lTcstalSJ+yW8qQkpxrrU6jbrKXowZVHQZwqat QACoidHFivsO3zPjcF4UrEsp3K7+GPXLMHwFWiqo/MYFVgGrcfXGUelzmFMLMgq1i+uo sbH0Ldej50FUxIK0xlpcZw7Fdy0Ymi+/amiVbVFQpbTTg0EVuoyRjMSXKZ4Dip76Tpj7 dg+7P25GXpuhevjPv4sL25/ckpyAmZFyEUM3y6zjPduR+zh+Rp09zax7VF1Xy0WoqPW4 TtAbOtGoPAYOGK5af6K9NNUEK40Z/7nOQsDhhSKkQ1Nxp+mWOQg5Ij7EBD9ZyB3mXGqq s3tg== X-Gm-Message-State: AOAM531HQE7eyEkiH4D/TV2j4zo/brpYShCN4T4qm8Rpk1GqSMLYFsLk C936pENgg9gK9lR9HW7oo1MtYj+KUWB4Zg== X-Google-Smtp-Source: ABdhPJxNe2fsdqnR0PFf2HujrDLOE4ZdbtpFgcd2RO6sPhtJN+7I2irnz8gwRtfj64NeIBG0j6LHZg== X-Received: by 2002:a7b:c4c4:: with SMTP id g4mr18500289wmk.93.1635982693604; Wed, 03 Nov 2021 16:38:13 -0700 (PDT) Received: from localhost.localdomain (178-190-169-40.adsl.highway.telekom.at. [178.190.169.40]) by smtp.gmail.com with ESMTPSA id f18sm3296261wre.7.2021.11.03.16.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 16:38:12 -0700 (PDT) Message-ID: <1f40f551ce8f21ea67e63fc357098c116cbcb1f0.camel@cybertec.at> Subject: Re: q re removal/recycling of WAL files From: Laurenz Albe To: Scott Ribe , pgsql-admin Date: Thu, 04 Nov 2021 00:38:12 +0100 In-Reply-To: <4B485D8E-9692-4009-8562-43BC0E54C975@elevated-dev.com> References: <4B485D8E-9692-4009-8562-43BC0E54C975@elevated-dev.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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