Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set datlastsysoid to an initial value for PG 15 and above #489

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pgsmo/objects/database/templates/15.0_plus/nodes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
db.datname as name,
ta.spcname as spcname,
db.datallowconn,
0 as datlastsysoid,
{# The first normal object id is given in PG source code. Article here describes it: https://dba.stackexchange.com/questions/316723/oid-release-ranges-for-built-in-aka-standard-database-objects-during-postgresq
# We set datlastsysoid to one less than that for PG 15 and above because the datlastsysoid column no longer is present past that
#}
16383 as datlastsysoid,
has_database_privilege(db.oid, 'CREATE') as cancreate,
datdba as owner,
db.datistemplate ,
Expand Down