NAME

Module::Build::Service::postgresql - Service implementation for postgresql

VERSION

version 0.91

SYNOPSIS

$self->services ([[slapd => 1]]);

DESCRIPTION

This is a service definition for postgresql. By default we start the service listening on a local unix socket, with a fairly default configuration and a database named test. You can use the following arguments to the service definition to customize this.

ATTRIBUTES

bindir

Attempts to figure out the location of the postgresql binaries, and make sure that the necessary binaries are available. If it fails to find everything we need, since this leaves us dead in the water, we abort.

data

Figures out a directory to store the postgresql data files in. If you override this, you must make sure the directory exists.

dump

The name of the file to dump the final database to in LDIF format. Defaults to postgresql.sql in the Module::Build::Service log directory.

service

Define a list of service name to database mappings that will be placed in pg_service.conf that can be used for connecting to the test database.

Each item may either be a string, in which case a 1:1 correspondence is assumed, or it can be an arrayref, where the first item is the service name and the second is the database name. Each database named will be created. Alternatively, you can manage it all yourself.

version

Tries to figure out the version of postgresql installed on the system. Since this is lazily built, it will only get called if we really need it...in which case, if we're not able to figure it out, we should just abort.

OTHER

See Module::Build::Service::Base for more configurable attributes.

METHODS

start_service

Tries to initialize and start the postgresql database.

stop_service

Stops the postgresql database. Totally overrides default implementation (since we want to use pg_ctl, not kill the process directly).

AUTHOR

Michael Alan Dorman <mdorman@ironicdesign.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Ironic Design, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.