Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tChQG-00Akgn-VM for pgsql-admin@arkaria.postgresql.org; Sun, 17 Nov 2024 15:42:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tChPE-000FMI-V0 for pgsql-admin@arkaria.postgresql.org; Sun, 17 Nov 2024 15:41:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tChPE-000FMA-I4 for pgsql-admin@lists.postgresql.org; Sun, 17 Nov 2024 15:41:45 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tChPB-002QrP-B5 for pgsql-admin@postgresql.org; Sun, 17 Nov 2024 15:41:44 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43163667f0eso10008485e9.0 for ; Sun, 17 Nov 2024 07:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=cybertec.at; t=1731858100; x=1732462900; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ZNEo2sLUOimXBrd8wso0WTQDsyzpl2cMS6D3NxIuKos=; b=ebZEm4B5LrdirSx9aw6mLBIrpvC1Gg8NBeXEbZ3FrMlZndvf916T4DtEaEkjOr4198 /tuwS8BjCCbFPJekdlW0rYStuIPcWf9Hk2pZFd5vW4FT4YCn1tTFoMQ4opar9MOTfpsm XN/GP0hTT2f7Qd9gt6SD+c/bxNlq30etF4uEs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731858100; x=1732462900; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZNEo2sLUOimXBrd8wso0WTQDsyzpl2cMS6D3NxIuKos=; b=SZ1NUeGZT0Zw3W3QA3TJVO4oQ36AToSst0tsBFrn2nVZrGIdea1MGiLZ/s6XbcoKE2 PlcAbnfLpqVUTJjGJGBlz7rQP0Dx06hRNm/9Uw3saAXp7teyEpDO4lWlJjFV8H9mspvw neSyWuI53dNbYA+hsAANn14iD6k1qpAP/5pYT31/uZ+e6reUMv+ErBQCPLbH3FYxOSR0 LIEt4L1cjHh9TClshXzu0LVo5FT9TvDMhlI4d8V1UCXPDorp8p8GQkhN4tXoZN/7eCcc FKIqNw7I0KBncb1RvIKY9McyU0BCjLt3BXhkQ0iiAcpKZwR/0SjIBOWvImWujVsoYckK ggtA== X-Forwarded-Encrypted: i=1; AJvYcCWz5De9e9Sv22OfBn7/1cX88LdxBJ2hHX2HAAcGE4bt+p6vQBt3U2b3AG+Cg2kH1nmKpLbi9WwOCD8g2g==@postgresql.org X-Gm-Message-State: AOJu0YxCFaJ7/L6rtbm+/2vVu1VyNRIRt74KnfidhkTOyttMqNmaVNFx 6QJBbkb/giN+ZQcrPQNTBQkUAQq2ZGOwZXgl3YkVV0ZmlCtGZKVVyiFRF2ek/ac= X-Google-Smtp-Source: AGHT+IGg+9F1en2olPtMGTHlWuiRLC/+JvmgV0TelF03F9ipZGMlPhOGETxP85T/JX3PxxmueTXAFA== X-Received: by 2002:a05:600c:46cc:b0:431:52f5:f48d with SMTP id 5b1f17b1804b1-432df78d75fmr83161605e9.31.1731858100473; Sun, 17 Nov 2024 07:41:40 -0800 (PST) Received: from localhost.localdomain ([213.208.157.39]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432dac0aca0sm122344125e9.29.2024.11.17.07.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Nov 2024 07:41:40 -0800 (PST) Message-ID: <14770c231bf27ea6d22376395ac8f02e41462ed5.camel@cybertec.at> Subject: Re: RDS restore failed due to WAL log and disk space-- any tidy fixes? From: Laurenz Albe To: Wells Oliver , pgsql-admin Date: Sun, 17 Nov 2024 16:41:38 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-2.fc40) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2024-11-16 at 16:33 -0800, Wells Oliver wrote: > I provisioned an RDS instance with 2500GB space and began the restore of = a database I know to be about 1750 GB using 16 jobs. >=20 > Unfortunately, it died very near the end when it ran out of disk space du= e to WAL log usage. Lots of: >=20 > 2024-11-17 00:07:09 UTC::@:[19861]:PANIC: could not write to file "pg_wa= l/xlogtemp.19861": No space left on device >=20 >=20 > And then kaboom. >=20 > I'm wondering what my course of action should be. Can I disable/reduce WA= L during a restore? > wal_level is set to replica, can this temporarily be set to minimal? Shou= ld I just eat the extra > costs to add headroom for the WAL? Would using fewer jobs during a restor= e reduce the amount of WAL > created? If you are using minimal WAL logging and you restore the dump in a single t= ransaction, you should see way less WAL generated, because data inserted into the table in = the same transaction as the CREATE TABLE statement need not be WAL logged. But you might more easily solve the problem by speeding up or disabling the= WAL archiver, so that PostgreSQL removes old WAL after the next checkpoint. Yours, Laurenz Albe