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 1gUQRc-0001EF-Dv for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 06:14:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gUQRZ-00031C-QX for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 06:13: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 1gUQRZ-000315-Fz for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 06:13:57 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUQRW-000719-Ic for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 06:13:57 +0000 Received: by mail-oi1-x235.google.com with SMTP id b141so16553334oii.12 for ; Tue, 04 Dec 2018 22:13:53 -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=ccV28pYKG4j2LW9OnJv83OaKq6KR84YiWB5jAR+yBGc=; b=F1ay359Roj0Clbyl9iQxyJXt9Hk4WEeZq0yXkpBf6UH2UkcoTLDl5DMzwsbF0SstHI yj3/+jnG7AVwUdZiYu5OZCs0cD9S89hef/sgkQWDx7yV+HlG5cdfVOnzFNTWZh1DzOly 5IumFsoElBr0pQ5r8mH2Sn1ccOmM5sUANfsukIovfFftHShK3cEvkwhxfM+IFuH1Ez+f Ja6q8SlHD52oeUbDo9ipJ12f6PfMVH9V4KIf6qMTELzq/9N1v7S9taPFFikUMN/9HjIz JXs9a3kWfMZ4DJvz7saRVKGqc6cAu5BFSD1bHP2Zxu0kG10uODm/qM4HyNB81ZdXV5l9 6l1g== 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=ccV28pYKG4j2LW9OnJv83OaKq6KR84YiWB5jAR+yBGc=; b=aijOFwLgfrYMrgTWrKqJOs+P88m7qRwkd/ZibSgfrAJATXlKqVZt8meKoJhYQHYURA +XfMHp347ZLSGfjqqQE47MEn9PFrsU5jT+uiAydupljG3h7c07SO2DWUITE2SqAXwrAS P533sBa4ptj6cl7M1OIq6aPUadIP/6R/eivtCUksHlP1GkoWAWE/9v59v40hMFel4VzS 4/2LBkorwAKC3TGsqXyQSXF4YZ0NB1UCrntSVEkJ6FZywZJhPigmfOZqAEizhaPrVE1S lKasPgYA6SCmq71yf1gLBs60Idy1JlagyzlQ1E2ijqFrKKFwutvAStLp/pcaeoNg/hV5 2t1g== X-Gm-Message-State: AA+aEWZWMHER8sh1h/PAjKQn+pr7b3lqQ0G1epe3zsr9IB61N5s7nW6V U6tuXQTnNr89Q+yrWwSokddDpiPw X-Google-Smtp-Source: AFSGD/XVbXxD9VUPsouc7Hqjo3Wp+K2mAoIMXJMOW+5MIOhCfzEnpy3acuN6JdLRTogohOCYjV+Z6g== X-Received: by 2002:aca:f044:: with SMTP id o65mr13155111oih.145.1543990431938; Tue, 04 Dec 2018 22:13:51 -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 x4sm7041514oix.32.2018.12.04.22.13.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 22:13:51 -0800 (PST) Subject: Re: Moving large table between servers: logical replication or postgres_fdw To: pgsql-general@lists.postgresql.org References: <7DD54254-62D2-4A7E-8A0A-0F57D7BC6DA1@gmail.com> From: Ron Message-ID: <9ffcfc88-8bf0-8f76-6126-4fdbdbdc4993@gmail.com> Date: Wed, 5 Dec 2018 00:13:50 -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: <7DD54254-62D2-4A7E-8A0A-0F57D7BC6DA1@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/05/2018 12:05 AM, Rob Sargent wrote: >> On Dec 4, 2018, at 8: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. > Can’t help but think an unread unwritten table goes to quietly to /dev/null :) Sigh, no. The legal and audit teams, and the customer, would be most upset if the data you're legally obligated to keep for 7 years suddenly disappears. -- Angular momentum makes the world go 'round.