gpbitmapreindex

gpbitmapreindex

Rebuilds bitmap indexes after a 3.3.x to 4.0.x upgrade.

Synopsis

gpbitmapreindex -m { r | d | {l [-o output_sql_file]} }
   [-h master_host] [-p master_port] [-n number_of_processes] [-v]

gpmigrator --version 

gpmigrator --help | -?

Description

The on-disk format of bitmap indexes has changed from release 3.3.x to 4.0.x. Users who upgrade must rebuild all bitmap indexes after upgrading to 4.0. The gpbitmapreindex utility facilitates the upgrade of bitmap indexes by either running the REINDEX command to reindex them, or running the DROP INDEX command to simply remove them. If you decide to drop your bitmap indexes rather than reindex, run gpbitmapreindex in list --outfile mode first to output a SQL file that you can use to recreate the indexes later. You must be the Greenplum Database superuser (gpadmin) in order to run gpbitmapreindex.

Options

-h host | --hosthost
Specifies the host name of the machine on which the Greenplum master database server is running. If not specified, reads from the environment variable PGHOST or defaults to localhost.
-m {r|d|l} | --mode {reindex|drop|list}
Required. The bitmap index upgrade mode: either reindex, drop, or list all bitmap indexes in the system.
-n number_of_processes | --parallel number_of_processes
The number of bitmap indexes to reindex or drop in parallel. Valid values are 1-16. The default is 1.
-o output_sql_file | --outfile output_sql_file
When used with list mode, outputs a SQL file that can be used to recreate the bitmap indexes.
-p port | --port port
Specifies the TCP port on which the Greenplum master database server is listening for connections. If not specified, reads from the environment variable PGPORT or defaults to 5432.
-v | --verbose
Show verbose output.
--version
Displays the version of this utility.
-? | --help
Displays the online help.

Examples

Reindex all bitmap indexes:

gpbitmapreindex -m r

Output a file of SQL commands that can be used to recreate all bitmap indexes:

gpbitmapreindex -m list --outfile /home/gpadmin/bmp_ix.sql

Drop all bitmap indexes and run in verbose mode:

gpbitmapreindex -m d -v

See Also

Greenplum Database Reference Guide: REINDEX, DROP INDEX, CREATE INDEX