Package: postgresql-common Version: 199.pgdg90+1 Severity: normal If I upgrade a cluster from v10 to v11 using pg_upgradecluster (in its dump-and-restore variant), in the new cluster each database has a public schema owned by user 'postgres', no matter who owned it before.
Further, in databases where the public schema had been dropped it reappears in the new cluster. I'm using the pgdg packages, but as I understand it you don't mind bug reports for those here. postgresql-10: 10.7-1.pgdg90+1 postgresql-11: 11.2-1.pgdg90+1 Steps to reproduce: -- as root: pg_createcluster --start 10 bugtest -- as user postgres: export PGCLUSTER=10/bugtest createdb schematest1 createdb schematest2 createuser user1 createuser user2 psql -c'drop schema public' schematest1 psql -c'alter schema public owner to user1' schematest2 psql -c'grant usage on schema public to user2' schematest2 psql -c'\dn+' schematest1 « List of schemas Name | Owner | Access privileges | Description ------+-------+-------------------+------------- (0 rows) » psql -c'\dn+' schematest2 « List of schemas Name | Owner | Access privileges | Description --------+-------+-------------------+------------------------ public | user1 | user1=UC/user1 +| standard public schema | | =UC/user1 +| | | user2=U/user1 | (1 row) » -- as root: pg_upgradecluster 10 bugtest -- as user postgres: export PGCLUSTER=11/bugtest psql -c'\dn+' schematest1 « List of schemas Name | Owner | Access privileges | Description --------+----------+----------------------+------------------------ public | postgres | postgres=UC/postgres+| standard public schema | | =UC/postgres | (1 row) » psql -c'\dn+' schematest2 « public | postgres | user1=UC/postgres+| standard public schema | | =UC/postgres +| | | user2=U/postgres | List of schemas Name | Owner --------+---------- public | postgres (1 row) »