1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Remove ALL keyword from TABLES IN SCHEMA for publication

This may be a bit too subtle, but removing that word from there makes
this clause no longer a perfect parallel of the GRANT variant "ALL
TABLES IN SCHEMA": indeed, for publications what we record is the schema
itself, not the tables therein, which means that any tables added to the
schema in the future are also published.  This is completely different
to what GRANT does, which is affect only the tables that exist when the
command is executed.

There isn't resounding support for this change, but there are a few
positive votes and no opposition.  Because the time to 15 RC1 is very
short, let's get this out now.

Backpatch to 15.

Discussion: https://postgr.es/m/2729c9e2-9aac-8cda-f2f4-34f2bcc18f4e
This commit is contained in:
Alvaro Herrera
2022-09-22 19:02:25 +02:00
parent ba50834551
commit 790bf615dd
21 changed files with 176 additions and 179 deletions

View File

@@ -700,7 +700,7 @@ test_sub=# SELECT * FROM t3;
<listitem>
<para>
one of the publications was created using
<literal>FOR ALL TABLES IN SCHEMA</literal> and the table belongs to
<literal>FOR TABLES IN SCHEMA</literal> and the table belongs to
the referred schema. This clause does not allow row filters.
</para>
</listitem>
@@ -1530,7 +1530,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
Moreover, if untrusted users can create tables, use only
publications that list tables explicitly. That is to say, create a
subscription <literal>FOR ALL TABLES</literal> or
<literal>FOR ALL TABLES IN SCHEMA</literal> only when superusers trust
<literal>FOR TABLES IN SCHEMA</literal> only when superusers trust
every user permitted to create a non-temp table on the publisher or the
subscriber.
</para>