mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 00:53:56 +00:00
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:
committed by
Anders Kaseorg
parent
aea156e46c
commit
1dd62c1973
@@ -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",
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
CREATE EXTENSION PGROONGA;
|
||||
GRANT USAGE ON SCHEMA pgroonga TO <%= @dbuser %>;
|
||||
@@ -1,3 +1,2 @@
|
||||
\connect zulip
|
||||
CREATE EXTENSION pgroonga;
|
||||
GRANT USAGE ON SCHEMA pgroonga TO zulip;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user