Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuImM-0004eb-3a for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Aug 2018 14:46:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fuImJ-0002tl-LY for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Aug 2018 14:46:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuImJ-0002tQ-Ao for pgsql-hackers@lists.postgresql.org; Mon, 27 Aug 2018 14:46:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fuImG-0001aN-38 for pgsql-hackers@postgresql.org; Mon, 27 Aug 2018 14:46:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7REjwbe001666; Mon, 27 Aug 2018 10:45:58 -0400 From: Tom Lane To: Stephen Frost cc: Peter Eisentraut , pgsql-hackers Subject: Re: pg_dump test instability In-reply-to: <20180827144138.GO3326@tamriel.snowman.net> References: <5137fe12-d0a2-4971-61b6-eb4e7e8875f8@2ndquadrant.com> <32399.1535379095@sss.pgh.pa.us> <20180827144138.GO3326@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Mon, 27 Aug 2018 10:41:38 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1664.1535381158.1@sss.pgh.pa.us> Date: Mon, 27 Aug 2018 10:45:58 -0400 Message-ID: <1665.1535381158@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> However, at least for the directory-format case (which I think is the >> only one supported for parallel restore), we could make it compare the >> file sizes of the TABLE DATA items. That'd work pretty well as a proxy >> for both the amount of effort needed for table restore, and the amount >> of effort needed to build indexes on the tables afterwards. > Parallel restore also works w/ custom-format dumps. Really. Well then the existing code is even more broken, because it only does this sorting for directory output: /* If we do a parallel dump, we want the largest tables to go first */ if (archiveFormat == archDirectory && numWorkers > 1) sortDataAndIndexObjectsBySize(dobjs, numObjs); so that parallel restore is completely left in the lurch with a custom-format dump. But I imagine we can get some measure of table data size out of a custom dump too. regards, tom lane