# phpman > perldoc > Apache::Session::Postgres

## NAME
    [Apache::Session::Postgres](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3APostgres/markdown) - An implementation of [Apache::Session](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession/markdown)

## SYNOPSIS
     use [Apache::Session::Postgres](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3APostgres/markdown);

     #if you want [Apache::Session](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession/markdown) to open new DB handles:

     tie %hash, '[Apache::Session::Postgres](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3APostgres/markdown)', $id, {
        DataSource => 'dbi:Pg:dbname=sessions',
        UserName   => $db_user,
        Password   => $db_pass,
        Commit     => 1
     };

     #or, if your handles are already opened:

     tie %hash, '[Apache::Session::Postgres](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3APostgres/markdown)', $id, {
        Handle => $dbh,
        Commit => 1
     };

## DESCRIPTION
    This module is an implementation of [Apache::Session](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession/markdown). It uses the Postgres backing store and no
    locking. See the example, and the documentation for [Apache::Session::Store::Postgres](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3AStore%3A%3APostgres/markdown) for more
    details.

## USAGE
    The special [Apache::Session](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession/markdown) argument for this module is Commit. You MUST provide the Commit
    argument, which instructs this module to either commit the transaction when it is finished, or
    to simply do nothing. This feature is provided so that this module will not have adverse
    interactions with your local transaction policy, nor your local database handle caching policy.
    The argument is mandatory in order to make you think about this problem.

## AUTHOR
    This module was written by Jeffrey William Baker <<jwbaker@acm.org>>.

## SEE ALSO
    [Apache::Session::File](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3AFile/markdown), [Apache::Session::Flex](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3AFlex/markdown), [Apache::Session::DB_File](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3ADBFile/markdown),
    [Apache::Session::Postgres](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession%3A%3APostgres/markdown), [Apache::Session](https://www.chedong.com/phpMan.php/perldoc/Apache%3A%3ASession/markdown)

