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 1sXiOM-005u77-S9 for pgsql-admin@arkaria.postgresql.org; Sat, 27 Jul 2024 14:27:26 +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 1sXiOL-005Jvz-A5 for pgsql-admin@arkaria.postgresql.org; Sat, 27 Jul 2024 14:27:25 +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 1sXiOK-005Jvr-Ut for pgsql-admin@lists.postgresql.org; Sat, 27 Jul 2024 14:27:24 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sXiOF-001l02-1H for pgsql-admin@postgresql.org; Sat, 27 Jul 2024 14:27:24 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-427fc9216f7so4822785e9.2 for ; Sat, 27 Jul 2024 07:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1722090438; x=1722695238; 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=R0WlrZW7BVxtqLjrLawdMwellTBCPz3rO+gnT30x8hw=; b=e4V63LZnMqcRbgC0i2pnQ/M7uQtnCnuWgjhPfoUTcHxxEp+/6ufCb1W07XqlI3Mb9o fdSvVThCYltyTmznTwS1t1+q5MAkjdzF0Woi+Lgpwv9bMsBT6N+Y75wquyJO673ZdR9v w58fHCI0QunHbQUBC+VUXOMi0J7OmuHSky7GvtGf0kMH75T6j3a960MpFBV3OFaov2nD yb4vVvNHteYe6zfW5ATMgYj1wCuFHS6QjFrZs51rVrGIYayZnGT/oiOROzW3jImeKI5T iedDVo2kbrOWU942cEL4sc7t8FXGbViY1QcKg+1E832hWFDMP6mvbeYwSKp8lZOo1GPi MoFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722090438; x=1722695238; 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=R0WlrZW7BVxtqLjrLawdMwellTBCPz3rO+gnT30x8hw=; b=qw2njSD9bienrA9Txoz7Zdr3EJn8JZjL2HtJt32I89pXgE8hNrB4k7imgidrswUUVi UQSrVJ8WxkwmXQpQvF9cP7mtAFw5O/G1Fy22q+/pKdfkYYpxfAQVYiwrPPvP5knFmZi0 UBQgcRLifFI9navwPP4RSWQXWWJtkhJ0HYe7QkPnG7uiB0cplAX9tHayJIYrQjdXPY/b 5sLY6nbtfL2SRdrtVGa15oOfPfgUdG4R2S+dELPXPdHZuNw9pq1h0clX1qKmPU5oZfFG r6pjfkPlzlVlf0LVrc31v2fF+bARHOvjjvzmTYRbyQrVDssu1kBV5eLNsGEC2Q70jtGu ZGeg== X-Forwarded-Encrypted: i=1; AJvYcCX6WtOX4pi2BaLoDQhluJSgtBch6XvloNESQmnzKZm58jv4UQVQSxBMKshQykprqCMQkm/0wK8rIh5MbscPx9lwOTzHCQt1wNQ3rA== X-Gm-Message-State: AOJu0Yzg/byU36fej8EwH7mTePsZ2sgqM6zSrwEpHV3W5r4bCidb4L5v EH4UVch2d2u3GJYdSoNP6n+V/hMLiSxMBuvXpQ/jBeoREEVNuy5b6yG761QQfwk= X-Google-Smtp-Source: AGHT+IF3Mkf8uJM/c7HQB9xfT2nTYCwcmb8ySWBwaPM1Fnt/KpkrLxdpZsK+MoyRMgeIH9jim1fZyQ== X-Received: by 2002:a7b:cd93:0:b0:426:63ff:f763 with SMTP id 5b1f17b1804b1-42811e42378mr17563045e9.36.1722090437363; Sat, 27 Jul 2024 07:27:17 -0700 (PDT) Received: from [192.168.83.211] ([41.66.99.80]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42817b91e20sm6677575e9.8.2024.07.27.07.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jul 2024 07:27:16 -0700 (PDT) Message-ID: <4ecf57eb54f6d457357e3882c6e9b0e6eb89aa1b.camel@cybertec.at> Subject: Re: Faster pg_resore with autovacuum off? From: Laurenz Albe To: Wells Oliver , pgsql-admin Date: Sat, 27 Jul 2024 16:27:15 +0200 In-Reply-To: References: 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 Fri, 2024-07-26 at 17:57 -0700, Wells Oliver wrote: > Maybe it's an old wives' tale, but I swear I've read a recommendation to = turn > autovacuum off when doing pg_restore into a new server.. Would it make th= e > restore faster? I think I've restored and then run=C2=A0vacuumdb=C2=A0+ a= nalyze, > but I wanted to check. If your machine is too weak to handle the combined workload of restore + autovacuum, that might get you something. Otherwise, you are just cheating= : the restore might be faster, but the database is not usable before autovacu= um and autoanalyze have proessed all restored tables. I wouldn't recommend turning autovacuum off, because it is a dangerous thin= g to do. If you forget to enable it, your database will be in big trouble. Yours, Laurenz Albe