The following bug has been logged on the website:
Bug reference: 16025
Logged by: Matthew Kingsbury
Email address: kingsbury.matthew@gmail.com
PostgreSQL version: 11.5
Operating system: Ubuntu 18.04 LTS
Description:
I was able to rename pg_default to something else, accidentally. However,
there appears to be no mechanism to replace pg_default nor can one replace
the pg_default after performing this action. E.g. if one runs the command:
ALTER TABLESPACE pg_default
RENAME TO not_pg_default;
ALTER TABLESPACE not_pg_default
RENAME TO pg_default;
One encounters this error:
ERROR: unacceptable tablespace name "pg_default"
DETAIL: The prefix "pg_" is reserved for system tablespaces.
Leaving one without the pg_default tablespace.