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 1iIfTv-00045l-8y for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 20:56:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iIfTt-0002K5-VB for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2019 20:56:17 +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 1iIfTt-0002Jh-IY for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2019 20:56:17 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIfTr-0004QS-2s for pgsql-general@postgresql.org; Thu, 10 Oct 2019 20:56:17 +0000 Received: by mail-qk1-x742.google.com with SMTP id h126so6905265qke.10 for ; Thu, 10 Oct 2019 13:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6ZAMGeDZ7Lu7aHru+GJNvAa1NA0Jwzym86qW5szuBf0=; b=g+HZyqpxo/axBac4QTmN56J0InegZ/+VrLSqGTpS29lmNRyC8omJ34NlqWl+a3Oui+ yllOs2h7t3AbW1D3jJOs6Yi/ewI7W2t0npVDVpmlcKOQBYPV1PSf79qLRWuYRXhKa6JN VfZSsXfb5k3VtZwyIzljfDs2Z9YAzar9sYFxJJrpfKzZvBPqJZhk4gE9DG9RdRBFE9eI ztgdAh3boUWFoiL7USHSDal9Q+amMYh5QOVHmk2tfcVVKkgb726s0RRCvHgT1wXXQ4Rf R5aSl5yIo8p6zqHPrlYUUFNyUEohOAytvpNAWwaDDnXgR8JSoBdaYLcX8XMjvzQnkEEd lpeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6ZAMGeDZ7Lu7aHru+GJNvAa1NA0Jwzym86qW5szuBf0=; b=lWaqPfKrpWUG7rz57ZrO942S5TKF2Yh+zuxtXKDXXTIDmzdLTL2iiY6r/CmWfVFNC+ 78kV1eWDCLMeRdwwRp5sDZ2bUvNM6tFSer98WZ2qNyyGKp1cMl9s/p5GO1kfWQ8NJ4nR l3fxmCIED3Cp4RIuyqIdT1aKHpoiEXJvB2vvjeHgZjF/4kYvICdoGjmD3uxKCWX6stTo 7C6W92dRmidqMP6Ka4i4SKKFL4+93hJHkDLbIWncseQWZKNM8x5lQQOGLZLXPlD88Jrm lS0rgNAQeFoGbzgVAXG5q2JLwigU0+jRj4rkdPkWlHHdQgJHZSc1uzAhZ7kcXaWYpfgw zGuw== X-Gm-Message-State: APjAAAX3xHbE7vG5dqMdhBH6ZtL4ilQ5TI9RDkh5BW9Af0hTpW1zO2d6 o3oMojrjXXugnRpJAC39a0q9jbq1ZN9obuy9pXc= X-Google-Smtp-Source: APXvYqwP0qD1yKVsaMnRaKRKIRMJjsEl+MM9PhnTbfK8b2t5ZAv4ZC3Q9b39yf7306pDQ1p9PZP97S1UnIdYaKeGCQY= X-Received: by 2002:a37:8707:: with SMTP id j7mr11937259qkd.399.1570740972938; Thu, 10 Oct 2019 13:56:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Cory Nemelka Date: Thu, 10 Oct 2019 14:55:36 -0600 Message-ID: Subject: Re: DDL support for logical replication To: Lev Kokotov Cc: Miles Elam , PG-General Mailing List Content-Type: multipart/alternative; boundary="000000000000b9f187059494a146" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000b9f187059494a146 Content-Type: text/plain; charset="UTF-8" Another use case is installations where there is heavy reliance on temporary tables in queries. Since you can't run queries that create temporary tables on servers that are binary replicas, this leaves the master (not horizontally scalable) or logical replicas --cnemelka On Thu, Oct 10, 2019 at 2:09 PM Lev Kokotov wrote: > Hi Miles, > > One issue is keeping the subscriber and the publisher schema identical. > Running migrations on both the publisher and subscriber does not seem > atomic to me, therefore I don't have a way to enforce consistency between > the two. The use case is simple: schemas change all the time, and keeping > two databases (or more!) in sync manually is tough. > > Another issue is migrating large databases (in the terabytes) to a new > version of Postgres with minimal downtime. Say it takes a week or two to > sync up the subscriber with the publisher, we have to enforce a migration > freeze for that duration. That's often inconvenient. > > We often want to have a database with a subset of data of a particular > table somewhere else, and logical replication is great, since it allows me > to run write operations on the subscriber. Binary replication forces me to > have two identical databases. > > Best, > Lev > > On Thu, Oct 10, 2019 at 12:49 PM Miles Elam > wrote: > >> Hi Lev, >> >> While I don't have an answer to your roadmap question, you've raised a >> different question for me. >> >> What are you expecting to get from logical replication of DDL commands >> that is not served by binary replication? I ask because typically someone >> would want to use logical replication if they wanted triggers to fire on >> the subscriber, they only a subset of all tables replicated, etc. >> >> Perhaps a better question would be "What problem are you trying to >> solve?" rather than focus on how you expected to solve that problem. >> >> >> Cheers, >> >> Miles Elam >> >> On Thu, Oct 10, 2019 at 11:08 AM Lev Kokotov >> wrote: >> >>> Hello, >>> >>> Is DDL support on a roadmap for logical replication? >>> >>> Thank you. >>> - Lev >>> >> --000000000000b9f187059494a146 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Another use case is installations where there is heavy= reliance on temporary tables in queries.=C2=A0 Since you can't run que= ries that create temporary tables on servers that are binary replicas, this= leaves the master (not horizontally scalable) or=C2=A0 logical replicas

--cnemelka


On Thu, Oct 10, 2019 at = 2:09 PM Lev Kokotov <lev.kokoto= v@gmail.com> wrote:
Hi Miles,

=
One issue is keeping the subscriber and the publisher schema ide= ntical. Running migrations on both the publisher and subscriber does not se= em atomic to me, therefore I don't have a way to enforce consistency be= tween the two. The use case is simple: schemas change all the time, and kee= ping two databases (or more!) in sync manually is tough.

Another issue is migrating large databases (in the t= erabytes) to a new version of Postgres with minimal downtime. Say it takes = a week or two to sync up the subscriber with the publisher, we have to enfo= rce a migration freeze for that duration. That's often inconvenient.

We often want to have a database with a = subset of data of a particular table somewhere else, and logical replicatio= n is great, since it allows me to run write operations on the subscriber. B= inary replication forces me to have two identical databases.

Best,
Lev

On Thu, Oct 1= 0, 2019 at 12:49 PM Miles Elam <miles.elam@productops.com> wrote:
Hi Le= v,

While I don't have an answer to your roadmap que= stion, you've raised a different=C2=A0question=C2=A0for me.

What are you expecting to get from logical replication of DDL comma= nds that is not served by binary replication?=C2=A0 I ask because typically= someone would want to use logical replication if they wanted triggers to f= ire on the subscriber, they only a subset of all tables replicated, etc.

Perhaps a better question would be "What proble= m are you trying to solve?" rather than focus on how you expected to s= olve that=C2=A0problem.


Cheers,

Miles Elam

=
On Thu, Oct 10, 2019 at 11:08 AM Lev = Kokotov <lev.= kokotov@gmail.com> wrote:
Hello,

Is DDL support on a roadmap for logical replication?

Thank you.
- Lev
--000000000000b9f187059494a146--