| From: | Zane Duffield <duffieldzane(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Proposal: pg_createsubscriber use without superuser privileges |
| Date: | 2026-02-04 02:42:49 |
| Message-ID: | CACMiCkXZsTOnJuJ56fh-zUip-V08nSQZV_+0qEuZ-jfqmRYxuw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Currently, in order to use pg_createsubscriber you must have superuser
privileges on the source database.
This requires stems from the use of FOR ALL TABLES
<https://www.postgresql.org/docs/18/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-FOR-ALL-TABLES>
in
the CREATE PUBLICATION command used. As far as I am aware, none of the
other steps performed on the source server require superuser.
I wonder whether pg_createsubscriber could be extended to use an existing
publication, after confirming that it is equivalent to the one it would
have created itself.
In my use case for pg_createsubscriber, I would prefer not to give the
downstream server superuser privileges, since it wouldn't need them for any
other reason.
I could probably contribute this feature myself, if it is agreeable.
Thanks,
Zane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hayato Kuroda (Fujitsu) | 2026-02-04 02:47:16 | RE: Use allocation macros in the logical replication code |
| Previous Message | Sami Imseih | 2026-02-04 02:37:31 | Re: Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements |