Re: Added schema level support for publication.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Rahila Syed <rahilasyed90(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Added schema level support for publication.
Date: 2021-06-17 04:26:44
Message-ID: CALDaNm1-2LeCDYtWLnaAUiH5kC6t0Svcfpzp9scDa8g9+ZnKYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 20, 2021 at 6:27 PM Rahila Syed <rahilasyed90(at)gmail(dot)com> wrote:
>
> Hi Vignesh,
>
>>
>> I have handled the above scenario(drop schema should automatically
>> remove the schema entry from publication schema relation) & addition
>> of tests in the new v2 patch attached.
>> Thoughts?
>
>
> Please see some initial comments:
>
> 1. I think there should be more tests to show that the schema data is
actually replicated
> to the subscriber. Currently, I am not seeing the data being replicated
when I use FOR SCHEMA.
>
> 2. How does replication behave when a table is added or removed from a
subscribed schema
> using ALTER TABLE SET SCHEMA?
>
> 3. Can we have a default schema like a public or current schema that gets
replicated in case the user didn't
> specify one, this can be handy to replicate current schema tables.

I felt supporting a syntax like below will be useful for supporting current
schema:
create publication testpub for schema schema_name
or
create publication testpub for schema CURRENT_SCHEMA

Let the user specify CURRENT_SCHEMA explicitly if required instead of not
specifying anything.

I have implemented similar lines in the V6 patch at [1]. Thoughts?

[1] -
https://www.postgresql.org/message-id/CALDaNm10g2h29a-oFHsadk-Du6RDhnVQT_vfTGqR82DsjxQLqQ%40mail.gmail.com

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2021-06-17 04:28:58 Re: Skip partition tuple routing with constant partition key
Previous Message Amit Kapila 2021-06-17 03:56:00 Re: Decoding speculative insert with toast leaks memory