A team can build a queue, search index, and permissions service before discovering that its existing database covers part of the problem. PostgreSQL is not a replacement for every dedicated system, but these ten features are worth evaluating before adding one more moving part. The order favors tools that solve common application problems; it is not a performance ranking. Check behavior against the PostgreSQL version you actually run.
1. Partial indexes
If only unpaid orders are queried frequently, indexing every historical order wastes space and write work. A partial index can cover the active subset with a WHERE predicate. Test that your query predicate matches the index condition; a prepared query with parameters may not let the planner prove that match. The feature helps when the active slice is small and stable, not when every query needs a different slice. Source: PostgreSQL partial indexes.
2. Expression indexes
Applications often search on a transformed value, such as lower(email). A normal index on email may not support that expression, but an index on the expression can. The cost is extra work on writes and a requirement that the query use a compatible expression. Before adding one, ask whether normalizing the value at ingestion would make data rules clearer. Source: PostgreSQL indexes on expressions.
3. Generated columns
A generated column can keep a derived value beside source fields without letting every writer invent its own calculation. It is useful for a stable expression such as a normalized lookup key. It cannot perform arbitrary cross-table computation, and stored versus virtual behavior depends on the PostgreSQL version. Treat the generation expression as schema: changing it deserves a migration plan and tests. Source: PostgreSQL generated columns.
4. UPSERT with ON CONFLICT
Two workers may try to create the same logical record. A preliminary SELECT does not prevent a race, but a unique constraint plus INSERT ... ON CONFLICT gives the database an atomic decision. Decide explicitly whether a conflict should update, do nothing, or return the existing row. An UPSERT is not permission to silently overwrite data supplied by another user. Source: PostgreSQL INSERT and ON CONFLICT.
5. SKIP LOCKED for work queues
Multiple workers can claim rows without waiting behind a row another worker already holds. That makes a small database-backed work queue practical for bounded workloads. It also gives an intentionally inconsistent view: skipped rows can be processed later, so strict ordering is not guaranteed. Keep transactions short and design leases, retries, and poison-job handling before calling it a queue. Source: PostgreSQL SELECT locking clause.
6. Materialized views
An expensive aggregate needed by a dashboard may be cheaper to compute on a schedule than on every request. A materialized view stores the result and can be indexed. Its data is stale until refreshed, and refresh behavior affects availability and resource use. Publish the last refresh time beside the number so readers do not mistake yesterday’s snapshot for a live counter. Source: PostgreSQL materialized views.
7. LISTEN and NOTIFY
A worker can receive a lightweight signal when something changes without polling every second. The notification is not a durable job record: a disconnected consumer can miss it. Store the actual work in a table and use NOTIFY as a wake-up signal, then let the worker query pending rows. This small distinction makes restarts much less surprising. Source: PostgreSQL LISTEN; PostgreSQL NOTIFY.
8. Row-level security
A multi-tenant application can add database policies that restrict which rows a role may see or change. That is valuable defense against a forgotten application filter, but policy design is subtle: privileged roles can bypass policies and connection pooling must set tenant context safely. Test every role, including background jobs and maintenance scripts, rather than assuming a policy alone proves isolation. Source: PostgreSQL row security policies.
9. JSONB with restraint
JSONB helps when a record carries genuinely variable metadata that you still need to query. It supports operators and indexes, but it is not a free substitute for a relational schema. If every row needs the same field and that field governs permissions or joins, a typed column and constraint usually communicate the rule better. Measure index size and update cost. Source: PostgreSQL JSON types.
10. EXPLAIN ANALYZE
A query plan turns “the database is slow” into testable questions about scans, joins, estimates, and actual row counts. EXPLAIN ANALYZE executes the statement, so be careful with writes and production load. Compare plans on representative data; a sequential scan of a tiny table is not automatically a problem. Use the plan to justify a change, then measure the user-facing result. Source: PostgreSQL using EXPLAIN.
How to use this list
Start with the invariant or user symptom, not the feature name. A partial index is useful when it improves the query you actually run; LISTEN is useful when a missed signal cannot lose a job. Keep the simpler design until measurement or a real failure gives you a reason to add complexity.
Sources and scope
Each entry links to primary documentation or project guidance. Check current versions and browser compatibility before applying a technique to a production system.



