Re: 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: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-02T15:42:16Z
Lists: pgsql-hackers
Attachments
- 0001-Test-server-side-basebackup-as-non-superuser.patch (text/x-diff)
Robert Haas <robertmhaas@gmail.com> writes: > On Fri, Jan 28, 2022 at 12:35 PM Dagfinn Ilmari Mannsåker > <ilmari@ilmari.org> wrote: >> On Fri, 28 Jan 2022, at 17:33, Robert Haas wrote: >> > LGTM. Committed. >> >> Thanks! > > It appears that neither of us actually tested that this works. Oops! > For me, it works when I test as a superuser, but if I test as a > non-superuser with or without pg_write_server_files, it crashes, > because we end up trying to do syscache lookups without a transaction > environment. I *think* that the attached is a sufficient fix; at > least, it passes simple testing. Here's a follow-on patch that adds a test for non-superuser server-side basebackup, which crashes without your patch and passes with it. - ilmari
Commits
-
Fix server crash bug in 'server' backup target.
- 8e2b6d45a033 15.0 landed
-
Adjust server-side backup to depend on pg_write_server_files.
- 7f6772317b4a 15.0 landed