man > Apache::Session::Postgres

🔖 NAME

Apache::Session::Postgres - An implementation of Apache::Session

🚀 Quick Reference

Use CaseCommandDescription
🆕 Create session with new DB handletie %hash, 'Apache::Session::Postgres', $id, { DataSource => 'dbi:Pg:dbname=sessions', UserName => $db_user, Password => $db_pass, Commit => 1 };Opens a new DBI connection using the provided DataSource, UserName, and Password.
🔗 Use session with existing DB handletie %hash, 'Apache::Session::Postgres', $id, { Handle => $dbh, Commit => 1 };Uses an already opened DBI database handle.
🎛️ Control transaction commitCommit => 1
or Commit => 0
Set Commit => 1 to commit after session operations; 0 to skip commit (manual control).

📜 SYNOPSIS

use Apache::Session::Postgres;

#if you want Apache::Session to open new DB handles:

tie %hash, 'Apache::Session::Postgres', $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', $id, {
   Handle => $dbh,
   Commit => 1
};

📘 DESCRIPTION

This module is an implementation of Apache::Session. It uses the 💾 Postgres backing store and 🔒 no locking. See the example, and the documentation for Apache::Session::Store::Postgres for more details.

🛠️ USAGE

The special Apache::Session 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 AT acm.org>.

📚 SEE ALSO

Apache::Session::Postgres
🔖 NAME 🚀 Quick Reference 📜 SYNOPSIS 📘 DESCRIPTION 🛠️ USAGE ✍️ AUTHOR 📚 SEE ALSO

Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 09:08 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format