| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: DOCS - CREATE PUBLICATION ... EXCEPT has no mention on what happens after drop/create tables |
| Date: | 2026-05-11 04:25:27 |
| Message-ID: | CAA4eK1JrnpyNgdU1z7Q3B=RqQXxw3ekFa6qyGFpBVC2O7P-WGQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, May 10, 2026 at 8:32 PM SATYANARAYANA NARLAPURAM
<satyanarlapuram(at)gmail(dot)com> wrote:
>
> The docs say EXCEPT "This clause specifies a list of tables to be excluded from the publication. "
> with no time qualifier. In case of drop/create the table automatically includes in the publication. Given the
> filter is based on OIDs this is expected. Should we enhance the documentation to mention this case?
>
The behavior is the same for the explicit INCLUDE publications as
well. For example, dropping and re-creating tables won't make it part
of publication automatically.
postgres=# create table inc_t(c1 int, c2 int, c3 int);
CREATE TABLE
postgres=# create publication pub_inc for table inc_t;
CREATE PUBLICATION
postgres=# select * from pg_publication_tables;
pubname | schemaname | tablename | attnames | rowfilter
---------+------------+-----------+------------+-----------
pub_inc | public | inc_t | {c1,c2,c3} |
(1 row)
postgres=# drop table inc_t;
DROP TABLE
postgres=# create table inc_t(c1 int, c2 int, c3 int);
CREATE TABLE
postgres=# select * from pg_publication_tables;
pubname | schemaname | tablename | attnames | rowfilter
---------+------------+-----------+----------+-----------
(0 rows)
You can see after drop/create, the table is no longer part of
publication. The same happens for the EXCLUDE case, so I don't see the
need for additional docs to explain this behavior. OTOH, if this
behavior was not obvious to you or you got some such question from the
users of this feature then feel free to propose a docs patch.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ayush Tiwari | 2026-05-11 04:34:38 | Question about hashed ScalarArrayOpExpr equality semantics |
| Previous Message | Michael Paquier | 2026-05-11 03:50:05 | Re: [RFC PATCH v0 0/7] Add EXPLAIN ANALYZE wait event reporting |