Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eradman/ephemeralpg
Quickly spin up a temporary PostgreSQL test databases
https://github.com/eradman/ephemeralpg
postgresql-database temporary-database test-automation
Last synced: 11 days ago
JSON representation
Quickly spin up a temporary PostgreSQL test databases
- Host: GitHub
- URL: https://github.com/eradman/ephemeralpg
- Owner: eradman
- License: other
- Created: 2018-03-27T12:35:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-07T19:04:36.000Z (2 months ago)
- Last Synced: 2024-10-13T00:08:09.938Z (about 1 month ago)
- Topics: postgresql-database, temporary-database, test-automation
- Language: Ruby
- Homepage: http://eradman.com/ephemeralpg/
- Size: 291 KB
- Stars: 186
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS
- License: LICENSE
Awesome Lists containing this project
README
Ephemeral PostgreSQL
====================Run tests on an isolated, temporary PostgreSQL database.
Temporary database created with `pg_tmp` have a limited shared memory footprint
and are automatically garbage-collected after the number of seconds specified by
the `-w` option (the default is 60).`pg_tmp` reduces the wait time for a new database to less than one second by
initializing a database in the background that is used by subsequent
invocations.Source Installation - BSD, Mac OS, and Linux
--------------------------------------------make install
Or to specify a specific installation location
PREFIX=$HOME/local make install
Man Page Examples for pg_tmp(1)
-------------------------------Create a temporary database and run a query:
uri=$(pg_tmp)
psql $uri -f my.sqlStart a temporary server with a custom extension:
uri=$(pg_tmp -o "-c shared_preload_libraries=$PWD/auth_hook")
psql $uri -c "SELECT 1"News
----Notification of new releases are provided by an
[Atom feed](https://github.com/eradman/ephemeralpg/releases.atom),
and release history is covered in the [NEWS](NEWS) file.