summaryrefslogtreecommitdiff
path: root/posts
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2026-04-30 10:57:13 +0200
committerStefan Kreutz <mail@skreutz.com>2026-04-30 10:57:13 +0200
commit03aeadc4ecfbd1dc0e87a0edb5610f258a5255c2 (patch)
tree4e5e06aff26e09ef802811a165f7e4e39aa989a9 /posts
parent79f9ed7167168468cf69bab25d77cde2df652e03 (diff)
downloadblog-03aeadc4ecfbd1dc0e87a0edb5610f258a5255c2.tar.gz
Add post temp-postgres 0.4.0
Diffstat (limited to 'posts')
-rw-r--r--posts/temp-postgres-0.4.0.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/posts/temp-postgres-0.4.0.md b/posts/temp-postgres-0.4.0.md
new file mode 100644
index 0000000..d090d49
--- /dev/null
+++ b/posts/temp-postgres-0.4.0.md
@@ -0,0 +1,41 @@
+---
+title: "temp-postgres 0.4.0"
+description: "A major UX upgrade for the temporary PostgreSQL server."
+published: 2026-04-30
+---
+
+[temp-postgres](https://git.skreutz.com/temp-postgres.git/) is a small utility to run the PostgreSQL server off a temporary directory.
+
+It's been almost six years since the [initial release](/posts/temporary-postgresql-server).
+The new version completes a major upgrade in terms of user experience and implementation:
+
+* Rewritten in async Rust to improve error and signal handling
+* UNIX-style command wrapper option
+* Structured logging (also known as tracing)
+* Graceful shutdown with configurable timeout
+* Experimental Nix flake support
+
+Some examples from the [readme](https://git.skreutz.com/temp-postgres.git/tree/README.md), also available on [crates.io](https://crates.io/crates/temp-postgres-command) and [lib.rs](https://lib.rs/crates/temp-postgres-command):
+
+```sh
+# Install temp-postgres using Cargo.
+cargo install temp-postgres-command
+
+# Run temp-postgres using Nix.
+nix run git+https://git.skreutz.com/temp-postgres.git -- --help
+
+# Optionally with a fixed PostgreSQL major version.
+nix run git+https://git.skreutz.com/temp-postgres.git#temp-postgres_18 -- --help
+
+# Wrap the psql command for an interactive terminal. No configuration necessary.
+temp-postgres -- psql
+
+# Run SQLx integration tests against a temporary database.
+temp-postgres -- cargo test
+
+# Create a symbolic link to enable static configuration.
+temp-postgres --symlink db
+psql --host "$(realpath db)"
+```
+
+See the [changelog](https://git.skreutz.com/temp-postgres.git/tree/CHANGELOG.md) for details.
Generated by cgit. See skreutz.com for my tech blog and contact information.