Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jC5Kp-0003YP-Jh for pgsql-general@arkaria.postgresql.org; Wed, 11 Mar 2020 17:39:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jC5Ko-0002Es-G0 for pgsql-general@arkaria.postgresql.org; Wed, 11 Mar 2020 17:39:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jC5Ko-0002EO-2l for pgsql-general@lists.postgresql.org; Wed, 11 Mar 2020 17:39:58 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jC5Kl-0004nj-HD for pgsql-general@lists.postgresql.org; Wed, 11 Mar 2020 17:39:56 +0000 Received: by mail-wr1-x443.google.com with SMTP id t11so3770396wrw.5 for ; Wed, 11 Mar 2020 10:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:reply-to:to:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=TDZukFqdP+X9sIZs8wmlQ9cTl2KpuqpD7SziOjKC2+Q=; b=JTpSjvtDKbC+k3wtz35dNplAD/W++Q4+5JTqRETRKQek4wPB1036IxTGHv5HixdacD upEieqw+oPaTsYCl9ZGH11OWUzPy7yOjPo2gUUSbiGpE5EW0TypH/hUX8Tg+QeSGKPi+ sq9Teb1Jed6pWBSpnYNmlmDmZw2fWvEw5zDmpIRUmkDXQ6+7i5PH3Io+bX2Qtat+xuTS HeA6gaeRcttyxxH4/z5BXE3vXdun3VxI4eUMTWT1G+6MxAP02F/2NaUod+ZPSgGLja/t GxwFsyOY2tatfly9vLiPmSfGO0bHmtETHY3OhcszTLOaNQ2X6xqRzP+p7XNXQ0FyL9ko 57Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:reply-to:to:date :in-reply-to:references:mime-version:content-transfer-encoding; bh=TDZukFqdP+X9sIZs8wmlQ9cTl2KpuqpD7SziOjKC2+Q=; b=Am2wKMh0gKInaUSg4Q7/PG8PUpWBQU0WWp1yD91zIMKiNFertWVBBHd21ATr6Rwh2u zC3t5ZPsdfjT1Z0HvDOdQyl8Po7Zx/jtijPsoW/nEPpuEsu8Byl95uI0IJJ/S0GhzweK WV1xP0S23wch3EuJC8vs82fxQI+8VR83XV10apeh6XQ2NXHQzav0ZxSEvfTbAHBoMfrS TpA+Dbzhtq/GtmlB5DeJFx8IpRUmfC2hFdGKypd9sZDq4R0X4UOoaVSpogCXGT+A4bKV Q8/xow7WQRmbYymokHy3z/TqGsE76DRzk6XR8AA0eOdcTGOibBhtfEGtG7rLpnhCTvsm 1c+w== X-Gm-Message-State: ANhLgQ1cZ4rIIeFNuiGLONitKciEEMcJGkmMduNSMd21X94sk+kuTuzK CALJdJ8RMyHuaPb6nhYRh+OC+mcZ X-Google-Smtp-Source: ADFU+vuGccysUnzp+hHcQie1MmLt/ADKKdupvRcRmiqZVEfr57wsAIoLCnwQeL2O/LV8Df2KxI5jkw== X-Received: by 2002:adf:f08e:: with SMTP id n14mr5428667wro.367.1583948393959; Wed, 11 Mar 2020 10:39:53 -0700 (PDT) Received: from torstenknbl.mgm-edv.de ([185.40.248.10]) by smtp.googlemail.com with ESMTPSA id w22sm9283549wmk.34.2020.03.11.10.39.52 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Mar 2020 10:39:53 -0700 (PDT) Message-ID: Subject: Re: Force WAL cleanup on running instance From: Torsten Krah Reply-To: krah.tm@gmail.com To: "pgsql-general@lists.postgresql.org" Date: Wed, 11 Mar 2020 18:39:52 +0100 In-Reply-To: <87sgievnyu.fsf@jsievers.enova.com> References: <3f91429eb65ac8aa3c77361c587e786a290b92f0.camel@gmail.com> <87sgievnyu.fsf@jsievers.enova.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am Mittwoch, den 11.03.2020, 11:46 -0500 schrieb Jerry Sievers: > If your site can afford a restart after the bulk load, > > 1. Clean shutdown. > 2. pg_resetwal > 3. Start > > That should leave you with a very small N WAL files, perhaps just 1, > though I've not run it lately to reverify. Thanks - that worked like a charm and is exactly what I was looking for, of cause I can afford that, it's shutdown after the init anyway - so after running pg_resetwal this was left: root@53e0d45ce5d7:/var/lib/postgresql/data/pg_wal# ls -lh total 17M -rw------- 1 postgres postgres 16M Mär 11 17:23 000000010000000000000012 drwx------ 2 postgres postgres 4,0K Mär 11 17:13 archive_status Nice one :) thanks. kind regards Torsten