Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4Ko9-00082O-IG for pgsql-general@arkaria.postgresql.org; Fri, 06 Apr 2018 06:25:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f4Ko8-0002i3-I8 for pgsql-general@arkaria.postgresql.org; Fri, 06 Apr 2018 06:25:08 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4Ko8-0002hq-9j for pgsql-general@lists.postgresql.org; Fri, 06 Apr 2018 06:25:08 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f4Ko1-0004vT-Op for pgsql-general@postgresql.org; Fri, 06 Apr 2018 06:25:07 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 6516342DCF; Fri, 6 Apr 2018 08:24:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id tXKRtHvt7i3t; Fri, 6 Apr 2018 08:24:58 +0200 (CEST) Message-ID: <1522995896.2420.3.camel@cybertec.at> Subject: Re: pg_basebackup or dump for starting replication process From: Laurenz Albe To: PegoraroF10 , pgsql-general@postgresql.org Date: Fri, 06 Apr 2018 08:24:56 +0200 In-Reply-To: <1522943144800-0.post@n3.nabble.com> References: <1522943144800-0.post@n3.nabble.com> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PegoraroF10 wrote: > For replication purposes only, there are any difference between pg_basebackup > or dump to copy data from Master to Slave ? > On Docs is written that pg_basebackup can be used both for point-in-time > recovery and as the starting point for a log shipping or streaming > replication standby servers. > > We are using just Dump, there are any caveat of using it for logical > replication ? For *logical* replication you can start with a "pg_dump --schema-only", but for *physical* replication only a pg_basebackup will do. Make sure that he tables are empty before you start logical replication. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com