pgroonga: Remove now-unnecessary 'GRANT USAGE' statement.

This was only necessary for PGroonga 1.x, and the `pgroonga` schema
will most likely be removed at some point inthe future, which will
make this statement error out.

Drop the unnecessary statement.
This commit is contained in:
Alex Vandiver 2023-06-23 20:31:42 +00:00 committed by Tim Abbott
parent 9af31c41da
commit dc2726c814
4 changed files with 2 additions and 17 deletions

View File

@ -89,20 +89,10 @@ class zulip::postgresql_base {
}
$dbname = zulipconf('postgresql', 'database_name', 'zulip')
$dbuser = zulipconf('postgresql', 'database_user', 'zulip')
file { $pgroonga_setup_sql_path:
ensure => file,
require => Package["${postgresql}-pgdg-pgroonga"],
owner => 'postgres',
group => 'postgres',
mode => '0640',
content => template('zulip/postgresql/pgroonga_setup.sql.template.erb'),
}
exec{'create_pgroonga_extension':
require => File[$pgroonga_setup_sql_path],
require => Package["${postgresql}-pgdg-pgroonga"],
# lint:ignore:140chars
command => "bash -c 'cat ${pgroonga_setup_sql_path} | su postgres -c \"psql -v ON_ERROR_STOP=1 ${dbname}\" && touch ${pgroonga_setup_sql_path}.applied'",
command => "bash -c 'echo \"CREATE EXTENSION PGROONGA\" | su postgres -c \"psql -v ON_ERROR_STOP=1 ${dbname}\" && touch ${pgroonga_setup_sql_path}.applied'",
# lint:endignore
creates => "${pgroonga_setup_sql_path}.applied",
}

View File

@ -1,2 +0,0 @@
CREATE EXTENSION PGROONGA;
GRANT USAGE ON SCHEMA pgroonga TO <%= @dbuser %>;

View File

@ -1,3 +1,2 @@
\connect zulip
CREATE EXTENSION pgroonga;
GRANT USAGE ON SCHEMA pgroonga TO zulip;

View File

@ -116,8 +116,6 @@ SELECT unnest(
ARRAY['ALTER SYSTEM SET pgroonga.enable_wal = ''on''', 'SELECT pg_reload_conf()']
END
) \gexec
GRANT USAGE ON SCHEMA pgroonga TO $USERNAME;
EOF
psql -v ON_ERROR_STOP=1 -e -h localhost postgres "$USERNAME" <<EOF