Skip to content
What's new

Rent v0.7.0

This release adds PostgreSQL session timeouts and improves partial-index migrations. A new production-access tutorial brings projections, paging, counts and short transactions together.

Bound database work with session timeouts

Configure PostgresSessionOptions with statement_timeout, lock_timeout, and idle_in_transaction_session_timeout. Connect through DatabasePool::connect_postgres_with and pass the pool to Client::new.

The settings apply to every physical connection, including replacements. Leave a value unset to preserve the server or URL default. Use zero to disable that timeout. See runtime configuration for setup and the runtime tutorial for application examples.

Evolve partial indexes safely

Changing a named partial index's predicate produces the corresponding migration and drift result. Equivalent structural spellings avoid unnecessary replacements, while changed values and operators remain meaningful differences.

Review replacement SQL and use --allow-destructive when required. Keep previously applied migrations intact. See migration drift.

Build efficient application queries

The production-access tutorial combines small projections, grouped counts, keyset pagination, tenant and permission boundaries, and transaction-bound history writes. The runtime tutorial also shows application-owned query-event observation without recording SQL text or bind values.

Upgrade every Rent crate and the CLI together, regenerate configured clients, and commit your application's lockfile. See installation.