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 1h39kQ-0003xe-Ml for pgsql-general@arkaria.postgresql.org; Mon, 11 Mar 2019 01:28:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h39kP-0001MF-0W for pgsql-general@arkaria.postgresql.org; Mon, 11 Mar 2019 01:28:57 +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 1h39kN-0001M7-UY for pgsql-general@lists.postgresql.org; Mon, 11 Mar 2019 01:28:56 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h39kK-00055N-E9 for pgsql-general@lists.postgresql.org; Mon, 11 Mar 2019 01:28:55 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7759721F1A; Sun, 10 Mar 2019 21:28:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 10 Mar 2019 21:28:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=q 4WeYGywY+kobSXAR/nLtZHL4XIQmabGJ5qk9FSrOmk=; b=I8OsZDbIMauii8W9s NopBFqkdk9u3SPy2PS+Te9UurP/tDG0m0U0RZKiCDw3g7YTuXQJj5kqCCukKOUTf QgFG0+/86us/KRsr1MR9i05/y9912+T8ReP/AvjuKX3+RNYHcCRfaBaOzJhem5wz 5EGClq0qkU3tJqVpW9olePgMDrMI5TIk/gCr8bANvg6yG3E5F18OLMTmIdjntczn sRttiqaE7qejo2OCclTHBE1ONgwUChz0n7u9827ORxQxfvFbwhCaKNbgIOvyfLKD hSNCSsFFL/gi8x4oTNXdPn8WoQ1mIlDgeeNrUuJlktTVoTkuMb67DflKuL3JbOk0 hw8og== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=q4WeYGywY+kobSXAR/nLtZHL4XIQmabGJ5qk9FSrO mk=; b=4RXGD5BTjbrxXaB9pnjZgHZF/kAN0bKIeojqUt5NR1d9CnhBayJM8QBz/ dQTIQiFd87QVuXwGUhUbF6b6maA1yFd/+DAJdwcqg8Zyl5rQd3zeNPKDNh6TOCgz 589l9hfdJ+q8iHeXwsQENEboWa6/fKcj4xFp+W0g5z7n22G4+aZCB/IJIGu1oNWu mojpBOuiEGmRfUTWVv4RHe93PHxuQaPAdzfBR23FhMYmv83DfzZ2AMG8EIYQzdZf wncjqSWDARoaD4+e03/GY21famzDL+84qYN3bqG10NqaLXx6vYG72mwP8XB/SzrG emmdEqGVNIGovMB9DOrXvGjB7ijBA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrgeehgdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefheenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrghinhepphhoshhtghhrvghsqh hlrdhorhhgnecukfhppeejuddrvdduvddrudehtddrvddtvdenucfrrghrrghmpehmrghi lhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C99110319; Sun, 10 Mar 2019 21:28:49 -0400 (EDT) Subject: Re: migration of 100+ tables To: Julie Nishimura , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: <06e27bdf-e046-32f8-af1c-55a60c21a88b@aklaver.com> Date: Sun, 10 Mar 2019 18:28:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/10/19 5:53 PM, Julie Nishimura wrote: > Hello friends, I will need to migrate 500+ tables  from one server (8.3) > to another (9.3). I cannot dump and load the entire database due to > storage limitations (because the source is > 20 TB, and the target is > about 1.5 TB). > > I was thinking about using pg_dump with customized -t flag, then use > restore. The table names will be in the list, or I could dump their > names in a table.  What would be your suggestions on how to do it more > efficiently? The sizes you mention above, are they for the uncompressed raw data? Are the tables all in one schema or multiple? Where I am going with this is pg_dump -Fc --schema. See: https://www.postgresql.org/docs/10/app-pgrestore.html The pg_restore -l to get a TOC(Table of Contents). Comment out the items you do not want in the TOC. Then pg_restore --use-list. See: https://www.postgresql.org/docs/10/app-pgrestore.html > > Thank you for your ideas, this is great to have you around, guys! > > -- Adrian Klaver adrian.klaver@aklaver.com