salt.states.postgres_tablespace

Management of PostgreSQL tablespace

A module used to create and manage PostgreSQL tablespaces.

ssd-tablespace:
  postgres_tablespace.present:
    - name: indexes
    - directory: /mnt/ssd-data

New in version 2015.8.0.

salt.states.postgres_tablespace.absent(name, user=None, maintenance_db=None, db_user=None, db_password=None, db_host=None, db_port=None)

Ensure that the named tablespace is absent.

name
The name of the tablespace to remove
user
System user all operations should be performed on behalf of
maintenance_db
Database to act on
db_user
Database username if different from config or defaul
db_password
User password if any password for a specified user
db_host
Database host if different from config or default
db_port
Database port if different from config or default
salt.states.postgres_tablespace.present(name, directory, options=None, owner=None, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None)

Ensure that the named tablespace is present with the specified properties. For more information about all of these options see man ``create_tablespace``(7).

name
The name of the tablespace to create/manage.
directory
The directory where the tablespace will be located, must already exist
options

A dictionary of options to specify for the tablespace. Currently, the only tablespace options supported are seq_page_cost and random_page_cost. Default values are shown in the example below:

my_space:
  postgres_tablespace.present:
    - directory: /srv/my_tablespace
    - options:
        seq_page_cost: 1.0
        random_page_cost: 4.0
owner
The database user that will be the owner of the tablespace. Defaults to the user executing the command (i.e. the user option)
user
System user all operations should be performed on behalf of
maintenance_db
Database to act on
db_user
Database username if different from config or default
db_password
User password if any password for a specified user
db_host
Database host if different from config or default
db_port
Database port if different from config or default