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 1sY3CZ-008TED-Cz for pgsql-admin@arkaria.postgresql.org; Sun, 28 Jul 2024 12:40:39 +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 1sY3CX-00B0vD-L1 for pgsql-admin@arkaria.postgresql.org; Sun, 28 Jul 2024 12:40:37 +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 1sY3CX-00B0v5-9S for pgsql-admin@lists.postgresql.org; Sun, 28 Jul 2024 12:40:37 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sY3CV-001twO-3L for pgsql-admin@postgresql.org; Sun, 28 Jul 2024 12:40:36 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a7d50edd130so79096866b.3 for ; Sun, 28 Jul 2024 05:40:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1722170434; x=1722775234; 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=Offt5nwtvUO7nB7g0L77Gk2di1pvW+tuf4Dheia+V/k=; b=Si+y2Zo5m5FEE9KRSW67ho0Iq/HZVE4stvecAlekWQpjuKpekYj5X8iHRI5gPJYPnW DoN0tw1iFtIl9tFDSjVmgYY6GsO5fJBH8qdmSK8ebZvd95DcBZ7aU5IqokEMh2oDX4Rr 5bo68djneHfwveQkYkYyRlgRV9o/SLCm6xkyQl2s+O70PGUq3JM6HzmiBdPFAGNk4y/O s1es0H4kEhD7tLQdlJa4jzJfU9LSrp6VJz07yujqocXeGDwseZE6BgsssT86GIhH0dwr PHtrp3Tjq7yxhwWxFzB7Y48hRg3GMyvQAaPFtLcI2SKivD7NwOvQMHXnu1e2TRsCcb9D poPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722170434; x=1722775234; 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=Offt5nwtvUO7nB7g0L77Gk2di1pvW+tuf4Dheia+V/k=; b=WpYGf3/UFlpm8aXZGEq5rHl7x1MDI6GgBdK2PqQFEu/PK1hhCjiVhJsfYqyoYl1LYS nxT+1SWoeJDi2CHPbWGo7nLgrKy8sylUSUbcMPwazTB9AIPyaOWrcr+4+nAI9Fg/nRTy IB6eFP2BYhJRMvvy7gQq+dAJfb/NQeSwoXof612nYCnIWqjuY/lQy5ujujcTuDWAJHQc auiXP4s+s/FmzKSsh2G1ncoPkSDIAr1KO6FCOqSF0PcI2S0NKlQd1PWt/Tg8HMBXYZQ3 M5CKhVCIuEBQSGFv9LPB2P/ETp11A0JKzA5IS/OkgTfGq2OH7XdPmQvV9r3WBY1ry/Mi 5lvw== X-Forwarded-Encrypted: i=1; AJvYcCVvAnhHj4u4cTs0GuDXhVdm/9LqT65v4uSj/85Ae86bc/Ap9gXFy3g6H59eQ41dForidSjP6aOqloptyHUGeH5RD65dfiX5zF2RpA== X-Gm-Message-State: AOJu0YxOia7O8ryKr58qH1eUueb4Yu0wYB7cjWV0MG56vPH2TKgvsRj/ n2WhFSe5NcgmWA/PSakf0PUKKEeW3Y1mkzWdNmsP6AmPhiASesEErkfIK7yMbm3SzvdHnjHwn+Z 1wSY= X-Google-Smtp-Source: AGHT+IHlLWeYiJa+yYL45sf7D+oOFRuJMhMIQMz8JdirB0182k3d1Q3WeK9gpMjgFugS943yeKgw1A== X-Received: by 2002:a17:907:7202:b0:a7a:9f0f:ab2b with SMTP id a640c23a62f3a-a7d400a1a4amr348347366b.32.1722170433409; Sun, 28 Jul 2024 05:40:33 -0700 (PDT) Received: from dynamic-pd01.res.v6.highway.a1.net ([2001:871:260:122:471a:3e46:e6b0:faf6]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad411c7sm386736766b.142.2024.07.28.05.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jul 2024 05:40:33 -0700 (PDT) Message-ID: Subject: Re: Faster pg_resore with autovacuum off? From: Laurenz Albe To: Scott Ribe , pgsql-admin Date: Sun, 28 Jul 2024 14:40:32 +0200 In-Reply-To: <154A742E-51A3-4A56-A570-65B9E6A14A4D@elevated-dev.com> References: <4ecf57eb54f6d457357e3882c6e9b0e6eb89aa1b.camel@cybertec.at> <154A742E-51A3-4A56-A570-65B9E6A14A4D@elevated-dev.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.3 (3.52.3-1.fc40) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2024-07-27 at 14:05 -0600, Scott Ribe wrote: > Similar argument applies to turning off fsync, which I have found to some= times make a > significant difference (depending on hardware). That's bad advice. Very bad advice. That is, unless you are ready to delete the cluster and run a new "initdb" = after an OS crash. But why risk that, if you can get virtually the same positive effect by dis= abling "synchronous_commit". But all that shouldn't have a big effect on "pg_rest= ore". To tune "pg_restore", increate "max_wal_size", "checkpoint_timeout" and "ma= intenance_work_mem". > The other argument I've seen, that if there's a crash during restore you'= ll have a > corrupted database, is bogus. What are you going to try to do with a data= base if there's > a crash during restore??? Drop it? You are wrong: it is not the database that is broken after a crash, but the= entire cluster. Yours, Laurenz Albe