Makes the app wait until Postgres actually answers, not merely until its container has started.
Tag
Snippets tagged postgres
Ranks statements by total time spent. Needs the pg_stat_statements extension enabled.
Uses a window function to number the duplicates and removes everything but the first of each group.
On Postgres 11 and later a nullable column with a default is a metadata-only change. Adding NOT NULL afterwards is the part that needs care.
Lists indexes that have never been scanned, which are pure write cost. Check against a long uptime before dropping any.
Where the disk actually went, including indexes and TOAST.
Returns one row per author with their posts nested, instead of a join that repeats the author on every row.
Forwards a local port through a bastion so a client can connect as if the database were local.
Copying rows with explicit ids leaves the identity sequence behind, so the next insert collides with an existing row.