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 1qtF3z-00BXsC-8U for pgsql-admin@arkaria.postgresql.org; Wed, 18 Oct 2023 22:30:51 +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 1qtF3w-009Xl1-1o for pgsql-admin@arkaria.postgresql.org; Wed, 18 Oct 2023 22:30:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtF3v-009Xks-J6 for pgsql-admin@lists.postgresql.org; Wed, 18 Oct 2023 22:30:48 +0000 Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qtF3t-0019od-AS for pgsql-admin@lists.postgresql.org; Wed, 18 Oct 2023 22:30:46 +0000 Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-d9a6b21d1daso8535016276.3 for ; Wed, 18 Oct 2023 15:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697668244; x=1698273044; darn=lists.postgresql.org; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=vJeajeqvwILxoYwONqGp98WDr9sUhs9E9De0cuKU77Q=; b=a8PhPrkuchBYSv7uwIqhdmk5aCQLds6gCYDX6P+qfgmp2CXgB8SZv3QKgoSED3Fujm BzeXSFVi73y2xDkxxfNttcVplvhryzh29hmbsr+IvhXpunZNG+A2Eoho2VoMptEL6URj IC++jZupyG49Aw34xMMhyB7BO9mRTreELV8hMtD26Da3N7Xg//BBbY7LALgToopoa/3G ci19wBTqjT7ItiWljJ3g8c4oRU4yD2uMSADrSK8XyUgIQd7gios9ksBpOIwCQKpA2c8x KATd3u06xHwrXjuhA6ZYWffcQfQb0wUuPjtI40kki0XwMGqysvnAoF4BxZaY7o/6gDCE /D6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697668244; x=1698273044; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=vJeajeqvwILxoYwONqGp98WDr9sUhs9E9De0cuKU77Q=; b=orV48kKUv7nK6qQhMphv4+TDSCKIu1nELSPwWetLWTFauN14rlusO47x/MhuJ+WUKU Az7qy3wiXzi/cVcr5h3BxAMrxnwhc7XzYjnYPFyLVzTydt4uVFpgOa0t4wFBJWaAgw0j ZDhK2O61KpTHVh37Z4O6lwmd2TtkNpC+9BJwPjROl2MOutKhw6hkfL2HnKkOT17LjU5Z SIJOLcTd6vUQUEfPK6jLSEDUYTxEYd/2j23g5KjPPBxwjezz5CZODFAQOsyuOeKpIlPS pugn72qU2Kl1TLlonEmK88vAEnhg1upaDnltW7Fe2puWZ1k1CMTBCY0z3v4nztVNzUOu JYLQ== X-Gm-Message-State: AOJu0Yw3DjHhoGAxDZnK7ED81oY1vmk6ND+tBva+/lK4INs7lLMK3IpX /pVCOqu/Oq+wQvd/7CfSJ82LRUHVOPg= X-Google-Smtp-Source: AGHT+IEESskErxEzlrOqeXPK+OucrV0QLLPYU7op4oETnGdVgpAOM6RrsXn+Mq/plCtgX3qxaCQbHA== X-Received: by 2002:a25:4644:0:b0:d91:6d2e:6f17 with SMTP id t65-20020a254644000000b00d916d2e6f17mr672425yba.54.1697668244237; Wed, 18 Oct 2023 15:30:44 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:3d15:81b3:3a0:4d09? ([2600:1700:bd2c:b810:3d15:81b3:3a0:4d09]) by smtp.googlemail.com with ESMTPSA id g201-20020a25dbd2000000b00d7e339ada01sm1622206ybf.20.2023.10.18.15.30.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 15:30:43 -0700 (PDT) Message-ID: Date: Wed, 18 Oct 2023 17:30:43 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Pgsql-admin Content-Language: en-US From: Ron Subject: pg_dump -Z6 (the default) can be pretty slow Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk In preparation for moving from 9.6 to something supported, I ran a pg_dump/pg_restore test (since the migrated databases will be on new servers, and we purge off old partitions and add new partitions, pg_upgrade and logical replication are off the table). (The servers are VMs on ESX hosts, and on the same subnet.) Our databases are chock full of bytea fields holding compressed images. pg_dump -Fd -Z6 took 25 minutes, and 5.5GB disk space. (remember, it's a test!), while pg_dump -Fd -Z0 only took 90 seconds, but consumed 15GB. This isn't really surprising to anyone who's ever tried to gzip a jpg file... Quite the speed increase if you can swallow the increased disk usage. pg_dump -Z3 did the best: only 8.5 minutes, while using just 5.8GB disk space. -- Born in Arizona, moved to Babylonia.