Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8RVb-00078K-QC for pgsql-admin@arkaria.postgresql.org; Thu, 12 Sep 2019 15:59:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8RVa-0003ar-JB for pgsql-admin@arkaria.postgresql.org; Thu, 12 Sep 2019 15:59:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8RVa-0003aT-6Y for pgsql-admin@lists.postgresql.org; Thu, 12 Sep 2019 15:59:46 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8RVY-0006v2-23 for pgsql-admin@lists.postgresql.org; Thu, 12 Sep 2019 15:59:45 +0000 Received: by mail-oi1-x241.google.com with SMTP id z6so12024191oix.9 for ; Thu, 12 Sep 2019 08:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=Jx0IE4svpZgNHvbF0KX3xa4gnG4mh0zlf2ASwRNVGJg=; b=do/XBXFM0yDbSo94SqSftUGnDB+6bML9TsXsMt1/bcLh3D45W8G2kosAfkFozYolsb Ey/q2oEg7eKZNgmhl871Uxi1K2r1CI4eT1uRjqagExCJUErmpW0wbeQJ/Z3w10CYHnpT 30OfmhzBSaYYiAuBL7aEQQCSEdgOcbXFVdW59wRGfRqCyaSO+08eYFtaDjhpUZZCv0hP /vu/3AYIGb8FFwvzCn/Rn8WkoNTguLoZ2lyLkUXN1pgtfC6THUDhOa39iYe6nkmYIe3c fpPegsw6GOeCIeQne0YjQFKRa2E7LoweyUUA3eNuiVI81/cbpkoreiJTWbmlyBAGNpsE 9mJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=Jx0IE4svpZgNHvbF0KX3xa4gnG4mh0zlf2ASwRNVGJg=; b=Qkg9iUCh4F6CtCpKJwBTqiOFyHFMn4uttbnoYn1C+HCkpeg/TRowzc+yIbQRv+TQox LK0QrApX4AeD40EHqSokl/IO+iRYqCDPPZ8q6+qbSqDQFbGEoU0IkgeKfXbo8XSZXNkq pniH/kz6z0TgRqPO2zH87+QElrfS0wJwz0ejV5ahFVPsJkrUBK/PjVqSN7T/dwGlrqql 9ZsPpm9k3Ug94xn6oSR565AUTLlliHvFqwhdrRgr+dK5DiwvR5mUwiemUHON8wgd6CdJ DbZci9eOqDtVZeR9sO1PqCpqh06RtqxBx0s19QKYt3QJLU1W6I+nJHHUAq9WeJZZWxMM FAFA== X-Gm-Message-State: APjAAAVQYG0BlR/QIXwzdkcpmoqsF58F3QdszvIJCYElkYiCQWHGVIKy GB4ZXUoFAIiR/Tq6M4FiaRS1pRadfncZQQ== X-Google-Smtp-Source: APXvYqwBOfX3QCAhZCrolUm/Geg1xSJfLHD0exHT2q9P5IrlME6vuLZuHxQifW6USu3260/nrkPCUw== X-Received: by 2002:aca:aa56:: with SMTP id t83mr750586oie.178.1568303571456; Thu, 12 Sep 2019 08:52:51 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id a2sm2696453otq.5.2019.09.12.08.52.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2019 08:52:50 -0700 (PDT) Subject: Re: pgdump slowness To: pgsql-admin@lists.postgresql.org References: From: Ron Message-ID: <306515fd-e7eb-77ea-d638-411d6ca7a4be@gmail.com> Date: Thu, 12 Sep 2019 10:52:48 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------BA903B28C168448A8A21F67E" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------BA903B28C168448A8A21F67E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 9/12/19 10:35 AM, Dhandapani Shanmugam wrote: > Hi Guys, > > We are having wired issue. pg_dump taking more time to backup 320 GB of > table,the table has bytea data type with TOAST table associated it. Please > let me know, if this is the expected behavior of pg_dump or do i need to > tune any of the parameters. I tried to run pg_dump with parallel -j option > , still no improvement and there is no lock on the table as well. any > inputs are welcome It took 16 hours to dump a 3TB v8.4 database that's full of bytea fields, using the 9.6 pg_dump with 8 threads.  This was from one DC to another *across a 10GB WAN link*. Note that I *disabled compression* because the bytea fields contained non-compressible images.  Thus, the dump size was 2.2x larger than the actual database. With compression enabled, the dump took a *lot* longer (though I didn't record those numbers). Ron -- Angular momentum makes the world go 'round. --------------BA903B28C168448A8A21F67E Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 9/12/19 10:35 AM, Dhandapani Shanmugam wrote:
Hi Guys,

We are having wired issue. pg_dump taking more time to backup 320 GB of table,the table has bytea data type with TOAST table associated it. Please let me know, if this is the expected behavior of pg_dump or do i need to tune any of the parameters.  I tried to run pg_dump with parallel -j option , still no improvement and there is no lock on the table as well. any inputs are welcome

It took 16 hours to dump a 3TB v8.4 database that's full of bytea fields, using the 9.6 pg_dump with 8 threads.  This was from one DC to another across a 10GB WAN link.

Note that I disabled compression because the bytea fields contained non-compressible images.  Thus, the dump size was 2.2x larger than the actual database.

With compression enabled, the dump took a lot longer (though I didn't record those numbers).

Ron
--
Angular momentum makes the world go 'round.
--------------BA903B28C168448A8A21F67E--