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 1qto4E-00E10t-Fo for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Oct 2023 11:53: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 1qto3D-000oRs-QM for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Oct 2023 11:52:24 +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 1qto3D-000oRj-D6 for pgsql-bugs@lists.postgresql.org; Fri, 20 Oct 2023 11:52:24 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qto39-001iLn-3W for pgsql-bugs@lists.postgresql.org; Fri, 20 Oct 2023 11:52:23 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso1047192e87.1 for ; Fri, 20 Oct 2023 04:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1697802739; x=1698407539; darn=lists.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=rz2qVSr7Iv9z5kF6F6d9XR6oGt3vSGryIDSv20Kz9q0=; b=lFC+Ir5ebYmz/1P4cFfsitzsiKu40bKoqyUgEdAjkhIxaIwM603Wo1aIyZ4+a6Tg6a Or6MobFinmSJVnGkAbk7x1KgevsLWM0ljxOahQ+oVDf1M6PgCmdNSE2iGUZICNRUeWvr fRfbZ6k4NomB0YrckLaR9QM/nSsrjOestnlRdlbGfW1/AA0yMn33hJTV37Hm906QEoPZ ARc80nKi6Fb/f1UCfHmj9XovPTjcL0DmxFMUP4jUtiTAU+wL9/KwDVWapM6K9eEzzm5V s7H1vmbN3BrGun5MRJ/xWpFLqyBtpyg/5DrkGmOA/3VkTMR+mE2MeW0xywKFvRZAArhu mGuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697802739; x=1698407539; 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=rz2qVSr7Iv9z5kF6F6d9XR6oGt3vSGryIDSv20Kz9q0=; b=GLvXU1rqFvF/OfdGpBRmMIePwfV8r/2hl+YIWvkA7QtPSUAs83JQzb1mQVk2K41Xyd T5ChEJR1MGqFVeN+GyvIMlrJ9/sZBviA/PCBc+yszhzVkQr+/1OrDRDskMgqACC6tQft Dps02fbJNTGfdGSmjjYZcYFeabhp4p4P5XOEXgdHCfKsdUKAHQpemhfUZlKoaDXdojEh JZqAJrvCHnD0wG5Mwx2Aauc/Ydn9kU+Zy0tRukapd+GaufqdqK6sBlegPGA93kWjC1CY xE86RTWipPGZpQse0z6ykAB3qnjdb6VwkvN/Lug0K3P5GywgTw9N79yrIGi2vBNpatUM 8wiQ== X-Gm-Message-State: AOJu0YwE1G4m0aE9zTDPqPxhN6Xew1MwyDz65ijCuXC28TGtbC9DxJJg JMX8y8skr/tNK+lHWpiSjcYEsg== X-Google-Smtp-Source: AGHT+IEGPpZSxtNjKGCldGdb6Wme3i30yb3jTFtD0YhcBfAm7OYNLtZ1RKneT6znqLHQuOFdFCoOUA== X-Received: by 2002:a19:6747:0:b0:4fe:347d:7c4b with SMTP id e7-20020a196747000000b004fe347d7c4bmr1156010lfj.7.1697802738405; Fri, 20 Oct 2023 04:52:18 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:e9d0:9516:cd08:a776:435d]) by smtp.gmail.com with ESMTPSA id y26-20020aa7d51a000000b0053dda7926fcsm1300550edq.60.2023.10.20.04.52.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 04:52:18 -0700 (PDT) Message-ID: Subject: Re: slow pg_dump with bytea From: Laurenz Albe To: Janning Vygen , pgsql-bugs@lists.postgresql.org Date: Fri, 20 Oct 2023 13:52:17 +0200 In-Reply-To: <1325559b-6a40-411d-a1ab-1e1162e3722b@kicktipp.de> References: <1325559b-6a40-411d-a1ab-1e1162e3722b@kicktipp.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2023-10-20 at 12:26 +0200, Janning Vygen wrote: > I don't know if the PG developers are aware of this: >=20 > https://serverfault.com/questions/1081642/postgresql-13-speed-up-pg-dump-= to-5-minutes-instead-of-70-minutes=20 >=20 > But this question is quite famous and many users like the solution. > So maybe you can fix it by changing the pg_dump process to not compress= =20 > any bytea data. Doesn't sound like a bug to me. Compression is determined when "pg_dump" starts. How should it guess that there is a binary column with compressed data in some table? Even if it di= d, I wouldn't feel well with a "pg_dump" with enough artificial intelligence t= o do this automatically for me (and get it wrong occasionally). In addition, I don't think that this problem is limited to compressed binary data. In my experience, compressed dumps are always slower than uncompressed ones. It is a speed vs. size thing. By the way, PostgreSQL v16 introduced compression with "lz4" und "zstd" to "pg_dump", which is much faster. Yours, Laurenz Albe