mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +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.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							9af31c41da
						
					
				
				
					commit
					dc2726c814
				
			@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user