Server-side base backup: why superuser, not pg_write_server_files?

Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: pgsql-hackers@lists.postgresql.org
Date: 2022-01-28T10:58:09Z
Lists: pgsql-hackers
Hi Hackers,

I just noticed that the new server-side base backup feature requires
superuser privileges (which is only documented in the pg_basebackup
manual, not in the streaming replication protocol specification).

Isn't this the kind of thing the pg_write_server_files role was created
for, so that it can be delegated to a non-superuser?

- ilmari



Commits

  1. Fix server crash bug in 'server' backup target.

  2. Adjust server-side backup to depend on pg_write_server_files.