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 1gUQVR-0001PA-RV for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 06:17:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gUQVQ-000222-43 for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 06:17:56 +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 1gUQVP-00021u-SR for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 06:17:55 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUQVM-00078c-Ru for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 06:17:54 +0000 Received: by mail-ot1-x335.google.com with SMTP id t5so17674749otk.1 for ; Tue, 04 Dec 2018 22:17:52 -0800 (PST) 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-transfer-encoding:content-language; bh=9gDiueynwWMO25Ub/8vdz9QYvamLTZGJDZDp+HEmZss=; b=lfzs5YT9QuKPgg5aYnrFPVqm8oquD+Up8yZaNGlK7AWHeR/xKqX6X9jO+kFaabrZxZ 6DeHdJrSUg0xV1dedDIUL2V0L4ewAd3RrnWkEwxZZwH8tsBTU1UDQ804q/+/Y70sRLtS Mku1fPyxUUuJfZhrlqFtgVh2ifnpC3QvOTZQoTh3YqIkFVn2YBAmy+szG17936Yl11wt UH4Yx8h4gpTFrz7dKP6KusjfC6GpvknfO8yZxdRYQawWHa+tT6qj1QBYbxGg030F+3tc i1iXN3ECPDnUXWHd6q0SA6j4BxsXPn04qAy3db9NMFei7E5Z7p3nVB3XZV2PfYYtpify 4RHw== 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-transfer-encoding :content-language; bh=9gDiueynwWMO25Ub/8vdz9QYvamLTZGJDZDp+HEmZss=; b=qlrkDarOdIc3BFzSYbd+qqO0f9aYLCkxnHOdCb8NzJIB6fg4vahl4oCkdvKJjTqy8z ihR9Z1B4JlKtxrycnWvEn2CHauHaVJTG3DI1lF7rMUbJ6dQeGKYAGBnieHrGOcBsQrz6 TtKwfwDrhAj0pBCOElghOdF0W39MqeUjqSBZmlSapPY2cjnAxn7hZIA1Vn6SwStIdmnL VUQ9vrQTI/d8hyQ6U69dRdUvlHcmtqZ1Mu8skOHAvEmrshGyupThKSz9UX3IN5blkosL a9zTRUUXSRv1wLblx4dwPuSI+yH36hqo6r1XPySDX6pUWYiRqlTFMYvyWLWMwZkUmYEP eM5A== X-Gm-Message-State: AA+aEWZoTneESu7yAnx9Q9vV4K9iT0NG1tSmabZyimD2h1pg4IeHk+s8 5xjXY1gerBGcDlp3OjjM1T3FGYi0 X-Google-Smtp-Source: AFSGD/XW2Pkv6D51Qc9y2VlqLNLRKhskzItXLOwnW7T/2i86OBj/Sco3gHTREL5JLCR/eG4BFfjhtg== X-Received: by 2002:a9d:3bc7:: with SMTP id k65mr12034673otc.11.1543990670876; Tue, 04 Dec 2018 22:17:50 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id x4sm7044499oix.32.2018.12.04.22.17.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 22:17:49 -0800 (PST) Subject: Re: Moving large table between servers: logical replication or postgres_fdw To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: <15379d46-03ed-39b5-8060-6a8f88348680@gmail.com> Date: Wed, 5 Dec 2018 00:17:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/04/2018 09:14 PM, Rhys A.D. Stewart wrote: > Greetings Folks, > > I have a relatively large table (100m rows) that I want to move to a > new box with more resources. The table isn't doing anything...i.e its > not being updated or read from. Which approach would be faster to move > the data over: > > a). Use pg_fdw and do "create local_table as select * from foreign_table". > b). setup logical replication between the two servers. Or KISS and COPY WITH FORMAT BINARY. -- Angular momentum makes the world go 'round.