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.

(cherry picked from commit dc2726c814)
This commit is contained in:
Alex Vandiver
2023-06-23 20:31:42 +00:00
committed by Anders Kaseorg
parent aea156e46c
commit 1dd62c1973
4 changed files with 2 additions and 16 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

@@ -108,7 +108,6 @@ EOF
"${ROOT_POSTGRES[@]}" -v ON_ERROR_STOP=1 -e "$DBNAME_BASE" <<EOF
CREATE EXTENSION pgroonga;
GRANT USAGE ON SCHEMA pgroonga TO $USERNAME;
EOF
psql -v ON_ERROR_STOP=1 -e -h localhost postgres "$USERNAME" <<EOF