Extensions for PostgreSQL DBAs
Extensions package extra features into PostgreSQL that load with CREATE EXTENSION. Popular ones include pg_stat_statements for query statistics, pgcrypto, PostGIS for geospatial data, pgvector for embeddings and pg_trgm for fuzzy text search. This unit shows Postgres acting as a platform on the PostgreSQL DBA path.
Stage: Extensions and Ecosystem · Part of the PostgreSQL DBA roadmap · Last reviewed 19 November 2026
What to learn in Extensions
- Install an extension with CREATE EXTENSION and list installed ones with the \dx command
- Enable pg_stat_statements through shared_preload_libraries and read its output
- Add a pgvector column and run a nearest-neighbour query
- Speed up LIKE and similarity searches with pg_trgm and a GIN index
- Check that an extension is available on a managed cloud service before depending on it
Extensions interview questions
Why does pg_stat_statements need a restart to enable?
It allocates shared memory and hooks into query execution at server start, so it must be listed in shared_preload_libraries, which only takes effect after a restart. After that, CREATE EXTENSION makes its views available in each database.
What index types does pgvector offer, and how do they differ?
HNSW builds a graph with strong recall and speed but slower builds and more memory. IVFFlat clusters vectors into lists, needs data present before building, and its recall depends on how many lists are probed. Both are approximate, trading recall for speed.
Where Extensions fits in the PostgreSQL DBA roadmap
Extensions belongs to the Extensions and Ecosystem stage (advanced level), which takes about 4 hours. Postgres as a platform.
Other units in this stage
Back to the full PostgreSQL DBA roadmap