Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vrmiguel/pgtemp
Manage temporary Postgres databases
https://github.com/vrmiguel/pgtemp
Last synced: 5 days ago
JSON representation
Manage temporary Postgres databases
- Host: GitHub
- URL: https://github.com/vrmiguel/pgtemp
- Owner: vrmiguel
- License: mit
- Created: 2023-10-18T23:38:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-04T19:20:41.000Z (about 1 year ago)
- Last Synced: 2024-12-02T02:31:27.972Z (2 months ago)
- Language: Rust
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pgtemp
`pgtemp` is a small utility to create, delete and connect to short-lived Postgres instances.
## Subcommands
### `pgtemp new --port `
Creates a start a new temporary Postgres database.
```bash
$ pgtemp new --port 5444
The files belonging to this database system will be owned by user "unknown".
This user must also own the server process.
...
LOG: database system is ready to accept connections
done
server startedNew instance is up!
```### `pgtemp connect`
Connects to a previously created Postgres database
```
$ pgtemp connect
psql (14.9 (Ubuntu 14.9-0ubuntu0.22.04.1))
Type "help" for help.postgres=#
```### `pgtemp delete`
```
$ pgtemp delete
waiting for server to shut down....
2023-10-18 20:44:44.635 -03 [44271] LOG: aborting any active transactions
2023-10-18 20:44:44.638 -03 [44271] LOG: background worker "logical replication launcher" (PID 44278) exited with exit code 1
2023-10-18 20:44:44.638 -03 [44273] LOG: shutting down
2023-10-18 20:44:45.119 -03 [44271] LOG: database system is shut down
done
server stopped
```