Skip to content

Backup and Restore: Permission Denied due to pg_shadow permisson

The following bug was encountered while @nwestbury was testing multi node Backup and Restore with PG16.

After working past the original issue encountered for multi node setups, after taking a backup and rebuilding then restoring the environment, the below error is now preventing the site from starting up.

2024-10-28_12:04:01.05227 STATEMENT:  SELECT username, password FROM public.pg_shadow_lookup($1)
2024-10-28_12:04:01.07627 ERROR:  permission denied for view pg_shadow
2024-10-28_12:04:01.07630 CONTEXT:  SQL statement "SELECT usename, passwd FROM pg_catalog.pg_shadow
2024-10-28_12:04:01.07631 	        WHERE usename = i_username"
2024-10-28_12:04:01.07631 	PL/pgSQL function pg_shadow_lookup(text) line 3 at SQL statement

Please see the related issue #440457 (comment 2197604746) for Mike's suggestions and Nick's results from them.

Edited by Lucie Zhao