| From: | Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Support EXCEPT for ALL SEQUENCES publications |
| Date: | 2026-04-10 06:08:44 |
| Message-ID: | CANhcyEVSXyQkvmrsOWPdQqnm2J3GMyQQrKhyCJiBQzqs6AvSow@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
Thread [1] introduced support for the EXCEPT clause for publications
defined with ALL TABLES. To extend this functionality, as discussed in
[2], this patch series adds support for the EXCEPT clause for
publications defined with ALL SEQUENCES.
The series consists of the following patches:
0001: Support EXCEPT for ALL SEQUENCES in CREATE PUBLICATION
This allows excluding specific sequences when using CREATE PUBLICATION
... FOR ALL SEQUENCES.
Example:
CREATE PUBLICATION pub1 FOR ALL SEQUENCES EXCEPT (SEQUENCE s1, s2);
0002: Support EXCEPT for ALL SEQUENCES in ALTER PUBLICATION
This extends ALTER PUBLICATION to manage exclusions for ALL SEQUENCES.
Examples:
ALTER PUBLICATION pub1 SET ALL SEQUENCES;
This clears any existing sequence exclusions.
ALTER PUBLICATION pub1 SET ALL SEQUENCES EXCEPT (SEQUENCE s1, s2);
This replaces the exclusion list with the specified sequences.
Sequences listed in the EXCEPT clause are excluded from the
publication and are not replicated to the subscriber.
This brings sequence publication behavior in line with the existing
support for FOR ALL TABLES ... EXCEPT.
[1]: https://www.postgresql.org/message-id/CALDaNm3%3DJrucjhiiwsYQw5-PGtBHFONa6F7hhWCXMsGvh%3DtamA%40mail.gmail.com
[2]: https://www.postgresql.org/message-id/CAA4eK1JWz=+-zEhQRszrGEbOzYKReXtsS9hGycWubHV8v2U-QA@mail.gmail.com
Thanks,
Shlok Kyal
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Support-EXCEPT-for-ALL-SEQUENCES-in-CREATE-PUBLIC.patch | application/octet-stream | 50.3 KB |
| v1-0002-Support-EXCEPT-for-ALL-SEQUENCES-in-ALTER-PUBLICA.patch | application/octet-stream | 24.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | vignesh C | 2026-04-10 06:11:35 | Use XLogRecPtrIsValid() instead of negated XLogRecPtrIsInvalid |
| Previous Message | Roman Khapov | 2026-04-10 06:05:08 | Re: Additional message in pg_terminate_backend |