Skip to content

PuppetDB: Postgresql database, 'puppetdb' doesn't yet exist when issuing psql command #1148

Open
@bschonec

Description

@bschonec

In PuppetDB setup for Postgresql, the database, 'puppetdb' doesn't yet exist when issuing the command:

psql puppetdb -c 'grant puppetdb_read to puppetdb'

The createdb command should precede the psql command:

sudo -u postgres sh
createuser -DRSP puppetdb
createuser -DRSP puppetdb_read
# For coordinating partition cleanup
psql puppetdb -c 'grant puppetdb_read to puppetdb'

createdb -E UTF8 -O postgres puppetdb
psql puppetdb -c 'revoke create on schema public from public'
psql puppetdb -c 'grant create on schema public to puppetdb'
psql puppetdb -c 'alter default privileges for user puppetdb in schema public grant select on tables to puppetdb_read'
psql puppetdb -c 'alter default privileges for user puppetdb in schema public grant usage on sequences to puppetdb_read'
psql puppetdb -c 'alter default privileges for user puppetdb in schema public grant execute on functions to puppetdb_read'

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedThis ticket has been accepted to our backlog and migrated internally

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions