Re: ALTER SUBSCRIPTION REFRESH PUBLICATION has default copy_data = true?

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ALTER SUBSCRIPTION REFRESH PUBLICATION has default copy_data = true?
Date: 2021-06-02 14:52:42
Message-ID: 447afb7c-67bb-10c7-8d80-0956ae59167d@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02.06.21 03:10, Peter Smith wrote:
> The documentation of ALTER SUBSCRIPTION REFRESH PUBLICATION [1] says:

> But I found that default copy_data = true to be unintuitive.
>
> e.g. When I had previously done the CREATE SUBSCRIPTION using
> copy_data = false, then I assumed (wrongly) that the subscription
> default would remain as copy_data = false even when doing the REFRESH
> PUBLICATION.
>
> Is that a deliberate functionality, or is it a quirk / bug?

copy_data is an option of the action, not a property of the
subscription. The difference between those two things is admittedly not
clearly (at all?) documented.

However, I'm not sure whether creating a subscription that always
defaults to copy_data=false for tables added in the future is useful
functionality, so I think the current behavior is okay.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-06-02 14:53:30 Re: ALTER SUBSCRIPTION REFRESH PUBLICATION has default copy_data = true?
Previous Message Tom Lane 2021-06-02 14:45:58 Re: tab-complete for CREATE TYPE ... SUBSCRIPT