Documentation menu

Docs Connections: PostgreSQL

Ask PostgreSQL

Attach the server and ask the way you would ask a colleague.The model first reads what you asked; Verbiqo checks the names against the server’s catalog, reads only what the question needs with the monitoring role, and writes the answer itself wherever its own reads settle it.

Attach

In Explain / Ask… with nothing selected, or in verbiqo chat:

/pg orders

Verbiqo shows the version, primary or standby, and how busy it is. Connect to the primary to see its standbys; to a standby to ask about that standby.

What to ask

You want to knowAsk, for example
What is wrong nowThe app is slow, what is the database doing? Is anything blocked?
Costly queriesWhat are the slowest queries? Are any indexes missing?
A permission errorPaste the error: permission denied for schema app_schema … Could you take a look? (Permission errors)
One slow statementWhy is this slow? followed by the statement: a SELECT, UPDATE, DELETE or INSERT (Explain a slow statement)
ReplicationWhy is this replica falling behind? Which standbys are synchronous?
Slow commitsCommits take seconds. Is synchronous replication the cause?
Vacuum and wraparoundAre we at risk of wraparound? Which tables need vacuuming?
Bloat and WALIs anything bloated? Why is WAL growing so fast?
SettingsWhat should I tune? Is work_mem right? The server has 32 GB of memory and 8 cores, on SSD: what should I set?
Whether a change helpedDid the changes help? (Check that a change helped)
IDs running outAre any sequences close to running out?
SecuritySecurity review of this database
CapacityHow long until the disks fill up? (Capacity planning)
What Verbiqo can seeWhat should I enable?
A list of what the server holdsList the views in schema app_a. Top 20 largest tables. Settings not at default. (Lists)
When counters were resetWhen were the statistics last reset? Since when are the counters counting? (Reset times)
Sessions in a transactionWhich sessions are idle in transaction? (Lists)
Who can write to a tableWho has write access on app.orders? (Who can do what)
Schema designReview the schema design of this database. Which tables have no primary key? (Schema design)
A schema change before you run itIs this safe to run now? followed by the ALTER TABLE or CREATE INDEX (Review a schema change)
How the application uses the serverDo we have N+1 queries? Can this app run behind PgBouncer in transaction mode? Does SET search_path matter behind the pooler? (Application patterns)
Data types and extensionsAre the jsonb columns indexed? Which tables suit a BRIN index? Did the pg_cron jobs run? (Data types and extensions)
Anything else about the serverWhat columns does t_orders have? (Questions no check covers)

Every check and the words that bring it in: PostgreSQL checks.

How a question is read

  1. The model reads it

    Before anything is read from the server, the model reads the question into a fixed list of topics (slow statements, bloat, replication, a list of one kind of object, schema design and the others on PostgreSQL checks). It also notes the names you typed (tables, schemas, roles, settings, columns, databases), whether you want every item, a number of items (top 20), a period, and whether the question follows on from the last answer. It answers nothing and runs nothing.

  2. Verbiqo checks the reading

    Every topic must be on the list and every name must appear in the question as you typed it. A database name is checked against the server’s databases, and a table or schema against the catalog of the database before it is used.

  3. Verbiqo reads what the topics need

    Only the reads the chosen topics need are run. A finding from those reads that is outside the question is added at the end, as at most three Also noticed lines, and only when it is a warning or critical.

  4. Verbiqo writes the answer

    For facts, lists, a review or health check, and advice on settings, readiness and indexes, Verbiqo writes the whole answer from what it read. For a cause, the answer opens with what Verbiqo read for each topic, and the model explains after it.

Names the question uses without a database are looked for in the databases of the conversation first, then in the others. A table found in only one other database is read there, and the answer starts with Read in database … and says why. A table in two databases is asked about, naming them, and nothing is read until you pick. A name no database has says which databases were looked in. A follow-up with no database named stays in the database of the previous answers, which is a preference: an object missing from it is still looked for elsewhere. A database you name is the one read.

When the model cannot be reached, or its reading is still unusable after one retry, Verbiqo picks the checks from the words of the question instead, as earlier versions did, and the activity feed says so. When it goes down or fails while writing the answer, Verbiqo prints only the facts this question needed, in plain lines. A question that names a statement or a table first gets that statement’s row in pg_stat_statements (or says it has none), and the table’s size, rows, dead rows, last analyze and the index that starts with the filtered column, before the findings about the server.

Questions Verbiqo asks back

  • An unclear question, or one that points at something no earlier turn holds (why is it slow? as the first question), is asked back in one short question. Nothing is read first.
  • A database the server does not have is said with the server’s databases, which you can pick from. If the name is a schema or table of the attached database, it is read as that object instead.
  • A table, index or schema the catalog does not have is said, with the close names the database does have, or with its schemas.
  • A follow-up (and its indexes?, what about t_invoices?) carries the object of the previous answer. A question that names its own subject is read on its own, whatever came before.
  • Asking Verbiqo to change something (drop that index) gets the statements for you to review and run; Verbiqo only reads.
  • A thank-you reads nothing.

Lists of what the server holds

Why it helps: a list you ask for is in the answer itself, read from the catalog, so you do not have to run \d commands to see what exists.

Ask List the triggers on t_orders. List all grants in schema app_a. Top 20 largest indexes. List the non system databases.

  • How many. Every item up to 50. Ask for every item (list all …) for up to 200, or give a number (top 20). The rest are counted, and the answer says how to see them.
  • Limited by a name. A table or schema named in the question limits the list, and the first line says so (Limited to schema app_a). A schema or table that does not exist is said, with the names that do.
  • Which database. Objects of one database are read in the attached database, or the one the question names. Roles, role memberships, replication slots and settings are read for the whole server.
  • What is never read. No row of your tables, no function body, no password, no subscription connection string and no foreign server option.
You wantAsk, for exampleEach item shows
Objects of one kindList the views. List the sequences in schema app_a.Its name and the facts that matter for that kind, such as rows and size for a table, owning column and range used for a sequence. The kinds are listed below.
DatabasesList the databases. List the user databases.Size and sessions, largest first. For user databases only, postgres, template0 and template1 are left out, and the answer says so.
SizesLargest tables. Size of each schema. Top 20 largest indexes.The ten largest, or the number asked. A table’s size includes its indexes and TOAST. A schema shows its tables, partitions, views and indexes.
Settings not at defaultWhich settings are not at their default?The value and where it was set: the configuration file and line, ALTER SYSTEM, the command line, ALTER DATABASE or ALTER ROLE, and whether it waits for a restart. Settings Verbiqo’s own session sets for itself are named apart.
Connections groupedHow many connections per application?Sessions by database, role, application, client address or state, with how many are active, idle and idle in transaction.
Tables by maintenanceTables never vacuumed. Tables never analyzed. Empty tables.Each table with its rows, dead rows or changes and size. “Never” counts from the last statistics reset, which the answer gives.
Locks nowList the locks.Locks held and waited for, by kind, mode and relation, Verbiqo’s own left out. A lock held by a prepared transaction is said so and named by its identifier (gid), because no session holds it. A relation of another database is named by that database, and a shared catalog as one.
Sessions in a transactionWhich sessions are idle in transaction?The sessions in a transaction for a minute or more, longest first, with their age, user, application and database; the shorter ones are counted, with the longest of them.
Foreign keys of a tableForeign keys of t_orders.Each key with its definition.
Extensions, tablespaces, publicationsWhich extensions are installed?Version and whether a newer one is available; tablespace location, size and owner; each publication with the tables it publishes.

Kinds of object you can list: databases, schemas, tables, partitioned tables, partitions, views, materialized views, foreign tables, indexes, sequences, functions, procedures, aggregates, triggers, event triggers, constraints by type, types, domains, extensions, foreign data wrappers, foreign servers, publications, subscriptions, replication slots, roles, role memberships, grants, default privileges, row security policies, tablespaces, settings, collations, casts, languages, extended statistics objects and rules.

A check asked as a list lists its items, then gives its verdict in one line. For example, list every sequence and whether any is running out shows each sequence with how much of its range is used, then the verdict of the sequence check.

When counters were reset

Ask When were the statistics last reset? stats reset Last reset of pg_stat_statements. Since when are the counters counting?

The answer gives the reset time of each counter family on its own, as far as the server has one: the database statistics, the background writer, the checkpointer, WAL, the archiver, I/O (pg_stat_io) and pg_stat_statements. If none can be read, it says so. Every figure that counts “since the last reset” (unused indexes, tables never vacuumed) is only as long as that window.

Who can do what

Ask Who has write access on app.orders?

Verbiqo reads the table’s own grants, whichever role they were made to (a role that cannot log in included), then the roles that hold the privilege through a group, then the superusers, and says which is which. It reads the catalog only; a pasted permission denied error has its own path (Permission errors).

Questions no check covers

Why it helps: Ask anything reasonable about the server in PostgreSQL’s terms, not only what Verbiqo’s checks cover, and get the answer read from the server rather than told how to read it yourself.

Ask What columns does t_orders have? Which users can log in? Which tables are in schema app_a?

  1. What exists

    Verbiqo first reads what is there: the schemas with how many tables each has, the tables and views with their sizes (every name up to about 200; above that, the counts and the largest), and anything the question names. Names and sizes only, never rows.

  2. The model reads

    The model writes its reads with the real names, and Verbiqo checks and runs each one, as for every question. If the model explains how to do it instead (psql’s \dt, for example), Verbiqo sends it back once to read.

  3. Which one?

    When the answer depends on which one you mean, such as two tables called orders in different schemas, the model may ask you, offering only names that exist.

  4. Long lists

    A read returns at most 500 rows, and the answer says when a list was cut. Say show the next 500 to continue: Verbiqo reads the next part itself.

Limits:

  • One answer does not list thousands of names. A large list comes in parts: by schema, by a name pattern, or 500 at a time.
  • Only what the monitoring account can see. PostgreSQL shows every table through pg_catalog, even to a role with no rights on them. Where it cannot see something, the answer says so rather than treating it as absent.
  • A limited number of reads per question. A broad question may be answered in part, and the answer says what was not read.
  • Checks keep their questions. A question one of Verbiqo’s checks covers (settings, slow queries, replication, sizes, whether a change helped, a pasted error or statement) takes that check.A list takes the list read: list indexes on t_orders lists the indexes of that table (Lists).
  • Organization limits. Where your organization limits how much Verbiqo reads per question, the list of what exists is not read first; the rest still applies.

Make the server faster

Work in this order. The first steps usually give the most.

  1. Let Verbiqo see enough

    Ask What should I enable? It lists what is missing, such as pg_stat_statements or query plans, with the statements to turn each on.

  2. Queries

    What are the slowest queries? Are any indexes missing? Then Why is this slow? for the worst of them.

  3. Vacuum and tables

    Which tables need vacuuming? Is anything bloated? Bloat is measured largest relation first, within a per-question read budget, and the answer leads with the relations that have the most space to give back (set per connection); check bloat of schema.table measures one table whatever the budget. Table settings such as fillfactor are sized from each table’s own figures.

  4. Settings

    What should I tune? Say what the machine is if no Prometheus source covers it: 32 GB of memory, 8 cores, SSD.

  5. Check the result

    Apply what you choose, wait a few days, and ask Did the changes help? Then start again from step 2.

Verbiqo never changes the server. Every recommendation is a statement for you to review and run.

Check that a change helped

  1. Review

    Ask What should I tune? Verbiqo saves a reading of the server on this computer: the settings, what it recommended, and the figures to compare later.

  2. Apply

    Run the statements you choose. Reload or restart as each one says.

  3. Wait

    Give it at least a day of normal work; a week if the workload has a weekly cycle.

  4. Ask

    Ask Did the changes help? on the same computer, with the same connection.

Under the answer, Verbiqo shows:

  • which recommendations you applied, applied differently, did not apply, or that still wait for a restart;
  • when they took effect;
  • a before-and-after table, measured per transaction and per call, so a busier week does not look like a slower one;
  • a verdict for each change.
VerdictMeans
ImprovedWhat the setting acts on got at least 10% better, and statements ran at least 10% faster.
Measure improved, speed unchangedWhat it acts on got better (for example the cache hit ratio), but statements ran no faster.
No measurable changeLess than 10% either way.
WorseWhat it acts on got at least 10% worse, and statements were no faster.
MixedWhat it acts on and the statements’ time disagree, for example the measure held while statements got slower.
Not enough dataLess than a day since the change, or too few calls to compare.

Each setting is judged by what it acts on:

SettingJudged by
shared_buffersCache hit ratio
work_memTemporary-file bytes per transaction
max_wal_size, checkpoint_timeoutCheckpoints per hour
wal_compressionWAL bytes per transaction
Planner and parallel settingsThe same statements’ time for the same work
fillfactor on a tableShare of that table’s updates that were HOT (a change of 5 points or more)
Vacuum thresholds on a tableThat table’s dead rows as a share of its rows (1 point or more)
Insert vacuum on a tableShare of that table’s pages marked all-visible (5 points or more)

After building an index

Ask Did the index help? or Is the new index used? Verbiqo keeps a reading of the indexes and table scans whenever it reviews settings, and when it suggests an index (at most once every 12 hours). For each index built since an earlier reading, it shows:

  • whether PostgreSQL uses it, and how often;
  • the time of the queries on its table, before and after, for the same work;
  • how often the table is still read in full;
  • a verdict: improved, worse or no measurable change for the queries on the table, or not enough data.

An index that has not been used says so, with the hours of work it was available. An index left invalid by a failed build is named, with the advice to drop it and build it again. Indexes dropped since the last reading are listed. Two indexes built on one table at the same time are each credited with their own use, but share the queries’ time, and Verbiqo says it cannot tell them apart. Where your organization limits how much Verbiqo reads per question, indexes are not read for this, and the follow-up covers settings only.

Good to know:

  • Change a few related settings at a time. When two changes move the same measure, Verbiqo names both and says it cannot tell them apart.
  • The answer cannot overrule a verdict. The model may explain it, but if it claims a different result, that sentence is removed.
  • A review soon after a change does not recommend a value that is already set, and does not push a changed setting further on figures from before the change.
  • A statistics reset between readings is noticed (pg_stat_reset(), pg_stat_statements_reset(), a crash): the comparison counts from the reset. If only some databases were reset, their totals are left out rather than misread. A clean restart keeps the statistics and changes nothing.
  • Too little work, no verdict. A window with fewer than 1,000 transactions (asked again soon after, or a quiet weekend) gives not enough data: a few transactions can show any change.
  • The readings stay on this computer. They are never sent anywhere; the last 20 per connection are kept.
  • Settings readings from before this release still work. Index results need a reading taken by this release before the index was built.
  • Stated machine sizes (32 GB, 8 cores, SSD) are used for the rest of the conversation, and every finding says they were stated, not measured. An attached Prometheus source measures them instead.

Other databases on the server

ToDo
Switch for the conversation/pg orders/billing (the connection, a slash, the database); in the terminal also /pg use billing. /c billing, connect billing and use billing are understood too.
Ask about one onceWhy is the billing database slow?
Check every databaseCheck all databases for sequences running out (up to ten)

Clusters: primary and standbys

Attach any node and ask about the cluster. Verbiqo reports the other nodes as the attached one sees them (from a primary, its standbys with their state and replay lag; from a standby, its upstream) and names each as not read: a question reaches only what is attached, so it never signs in to a node you did not attach. To read another node, attach it in a conversation of its own. If the question itself asks for it, for example read the other nodes with this connection’s credentials, Verbiqo reaches the nodes the attached one reports, at the addresses it gives and with the same credentials; a saved connection is still never used. With Patroni metrics from an attached Prometheus source it says whether Patroni agrees with who is really replicating.

Asking a replica

A replica answers for itself. Its query statistics (pg_stat_statements, if it is loaded there too), sessions, locks and per-table vacuum and dead-row figures cover only what runs on it; a replica neither writes nor vacuums, so the primary’s slow writes, blocking and vacuum are not visible from it. Verbiqo says so under any answer about queries, locks or vacuum on a replica, and an answer may not call those clear (nothing needs vacuuming) from there. Plans, schema, indexes and replay lag read the same as on the primary. For writes, blocking and vacuum, attach the primary with a read-only role.

Explain a slow statement

Paste it into the question. $1 placeholders are fine:

Why is this slow? SELECT * FROM orders WHERE status = $1 ORDER BY created_at DESC LIMIT 1
  1. Plan

    Verbiqo asks PostgreSQL for the plan. The statement itself never runs.

  2. Read it

    It looks for full scans that keep few rows, sorts too big for memory, and row estimates far from reality.

  3. Test an index

    With hypopg installed, it checks that a suggested index would be used before you build it.

A slow UPDATE, DELETE or INSERT

Why is this slow? DELETE FROM orders WHERE created_at < $1

A read-only role cannot plan a write, so Verbiqo splits it in two:

  • Finding the rows. It plans the SELECT that finds the same rows, with the same tables, joins and WHERE. This is where most slow writes spend their time.
  • Writing each row. It reads the table’s indexes, triggers and foreign keys, and points out:
    • foreign keys from other tables with no index on their side, so each deleted row scans the other table (the most common cause of a slow DELETE), with the index to create;
    • updated columns that are indexed, so the update cannot be HOT and writes to every index.

Plans need PostgreSQL 16 and pg_read_all_data (how to turn them on). Without them, Verbiqo says so; the checks on indexes, triggers and foreign keys still work.

What the answer opens with. Verbiqo checks the pasted statement itself and writes the first lines of the answer: for a write, the tables that reference the target with no index on their side, each with its rows, size and how often it was read in full, and the indexes each written row keeps up to date; then the plan of the statement, or of the search for a write’s rows, node by node, or why there is no plan; then the statement’s own figures in pg_stat_statements, or that it has none there. The model explains after these lines.

After a list of the slowest statements, ask Why is this slow? with no statement: the first statement of that list is the one checked, and the answer says so.

Your data is not touched. The statement you paste is never run. Verbiqo only asks for plans, which are estimates, and reads the catalog. Everything runs in a read-only transaction that PostgreSQL itself keeps from writing, and EXPLAIN ANALYZE, which would run the statement, is refused on your tables. For actual row counts and times, turn on auto_explain and attach the logs. All the guard rails: What Verbiqo can and cannot do on your server.

Permission errors

Paste the error as you got it, from any tool or the server log. For example:

ERROR: permission denied for schema app_schema [Failed SQL: CREATE TABLE app_schema.template]
  1. Read the error

    Verbiqo finds what was refused (a schema, table, sequence, function or database) and the statement that failed, and from that works out the privilege needed: CREATE to create in a schema, INSERT to insert into a table, and so on.

  2. Ask if it is not clear

    An error rarely names the role. Verbiqo then asks which role the connection uses, and lists the login roles that lack the privilege, and those that have it, so you can pick one. If the name matches objects in two schemas, or nothing in this database, it asks about that first.

  3. Read the catalog

    For that role it reads the object’s owner and grants, the role’s group memberships and which roles hold the privilege now.

  4. Answer

    Either the role lacks it, with the one GRANT that should fix it and the group other roles get it through, or the role has it now, so the failure came from another role, another database or server, or before a grant was made.

You can name the role up front to skip the question: … it connects as deployer, or paste a log line that shows user=deployer.

Schema design

Why it helps: finds the design choices that cause trouble later (no primary key, a foreign key with no index, a type that misbehaves), read from the catalog, so a developer can fix them before they matter.

Ask Review the schema design of this database. Which foreign keys have no index? Review the design of t_orders.

Seven checks, each also asked on its own: tables without a primary key, foreign keys without an index, constraints left NOT VALID, disabled triggers, unlogged tables, column types worth changing, and views stacked more than three levels deep. With a table named, each answers for that table first; with a schema named, only that schema is read. Each check gives the total it found. Up to 50 are listed one per line; a longer list names the first few and counts the rest, and asking for all of them lists up to 200. A check that found nothing says so, and one that could not be read says why instead of reporting none. What each looks for: Schema design checks.

Review a schema change before you run it

Why it helps: tells you what a migration will lock, for how long and behind whom, on this server, so a deploy does not stall the application.

Paste the statement, up to 10 in one question:

Is this safe to run now? ALTER TABLE app_a.t_orders ADD COLUMN status_code text DEFAULT 'new' NOT NULL;

For each ALTER TABLE, CREATE INDEX, DROP INDEX or REINDEX, Verbiqo says:

  • the lock it takes on this server’s version and what that lock blocks;
  • whether it rewrites the table, scans it, builds an index or changes only the catalog, and the free disk and WAL a rewrite needs;
  • the table’s size and estimated rows;
  • the sessions holding or waiting for a lock on the table now, and the oldest open transaction among them;
  • lock_timeout as sessions start, and for the table owner and any role or database that sets its own;
  • the safer form, such as CREATE INDEX CONCURRENTLY, or NOT VALID then VALIDATE CONSTRAINT, and to run it with a short lock_timeout and retry.

The statement is never run, planned or explained. What it cannot know: the role that will run the migration, whose own lock_timeout applies. A table name that exists in several schemas, none of them on Verbiqo’s search path, is not reviewed: the answer lists the schemas and asks you to name one.

Application patterns

Why it helps: shows from the server’s own counters how the application talks to the database, so you know where to look in the application code.

Ask Do we have N+1 queries? Is there connection churn? Can this app run behind PgBouncer in transaction mode? What is plan_cache_mode? Are statements inside functions tracked?

These are patterns the counters are consistent with, not proof of what the application does. Every answer ends with what the counters cannot show and what would show it, such as application traces or the server log. Details: Application pattern checks.

Behind PgBouncer in transaction mode

Ask Does SET search_path matter behind the pooler? Can we use LISTEN? Are advisory locks safe? Do temp tables work? What about WITH HOLD cursors, PREPARE or LOAD?

A question that names one session feature starts with what PgBouncer documents for it in transaction mode and the safe alternative, using the pool mode Verbiqo read from the console (or saying it is not known). Then it says whether pg_stat_statements recorded the feature in use. The features are session-level SET and RESET, LISTEN, session advisory locks, temporary tables, WITH HOLD cursors, SQL PREPARE and LOAD.

  • SET is grouped by parameter. A parameter set to the same value by every statement is not a leak; a parameter set to different values, or to a value Verbiqo cannot read from the statement text, is. PgBouncer keeps client_encoding, DateStyle, IntervalStyle, TimeZone, standard_conforming_strings and application_name per client, so a SET of those does not leak, and the answer cites the PgBouncer feature matrix. Values are compared within each pool: PgBouncer gives a server connection only to clients of the same database and user, so a parameter leaks only where one database and user sets more than one value, or one Verbiqo cannot read, and the answer names those pools. Where a SET leaks, the answer gives its remedies: SET LOCAL inside the transaction, a setting on the role or the database (ALTER ROLE … SET, ALTER DATABASE … SET), or session mode.
  • Prepared statements. A driver’s protocol-level prepared statements need PgBouncer 1.21 or later with max_prepared_statements above 0, or the driver setting that turns them off, or session mode. SQL-level PREPARE does not work in transaction mode.
  • When the console refuses (for example bouncer config error), the answer quotes the refusal, explains what PgBouncer means by it, says the pool mode is then unknown, and gives the next step: the user must be able to log in to the pgbouncer console database and be in stats_users or admin_users, and PgBouncer’s own log at the time has the exact cause.

Data types and extensions

Ask Are the jsonb columns indexed? Which tables suit a BRIN index? Is pg_partman maintenance running? Did any pg_cron job fail this week? Do the vector columns have an index?

GIN and full-text search, BRIN candidates, pg_partman and pg_cron, and pgvector. An extension that is not installed is said in one sentence. Details: Data type and extension checks.

How far to trust an answer

Why it helps: it tells you which parts of an answer Verbiqo read and checked, and which are the model’s own, so you know what to verify before you run anything.

  • Figures come from what Verbiqo read. A number in the answer that no reading backs (a rate, a size, a ratio) goes back to the model to correct; if it still has nothing behind it, the answer says it could not be validated. A value the answer proposes for a setting is a suggestion, not a reading, and is allowed.
  • A change’s verdict is Verbiqo’s. The model may explain it; a sentence claiming a different result is removed (Check that a change helped).
  • Some answers have no model text at all. When Verbiqo’s own checks answer the question, such as a health check or review, Verbiqo writes the answer itself from what it read, and the activity feed says the model wrote none of it.
  • Advice stays safe. A restart-only setting is never presented as applied by a reload, also when the reload is a separate step after the change. A remedy offered for another problem (for example max_prepared_statements for a session-level SET) gets a note saying what it does and what fits. A setting name the model got nearly right is corrected to the real one, with a note. A plain CREATE INDEX the model suggests, which none of Verbiqo’s findings gives, is flagged with the CONCURRENTLY form that does not block writes. A suggestion from the model that none of Verbiqo’s findings call for is marked as such.
  • Samples say what was taken. A sample of sessions is described as it happened, for example 10 readings over 16 seconds, and says so when the readings were further apart than planned (one a second). Durations of other sessions use the server’s clock, and one under a second, or one that would read below zero, is said as under 1 second.
  • Every statement is shown. The activity feed lists the statements Verbiqo’s own checks send, under the step that sent them. A statement sent once per relation is shown once, with how many times it ran.

Ask How many transactions a second is this server doing, and what is the cache hit ratio?

Every figure in the answer should match a finding or a reading under it. That is the quickest way to see where a number came from before you act on it.

What happened earlier

A database shows the present. Attach its logs and metrics in the same conversation:

/splunk prod
/pg orders
/prom prod
SourceAdds
/splunkSlow statements, lock waits, deadlocks, crashes and more from the PostgreSQL log (Log findings).
/promThe machine’s memory, cores and disks; Patroni failovers; pgBackRest backups; history for forecasts.

Ask what happened last night? and Verbiqo adds a timeline from every source: restarts, reloads, promotions, failovers, backups and log events, each with its source. It places events in time; it does not say one caused another.

Example: commits that took seconds

  1. Logs

    Any problems on the orders cluster in the last 24 hours? The slow-statement finding names COMMIT.

  2. Database

    Commits took up to 15 seconds yesterday around 3:40pm. Is synchronous replication the cause?

  3. Metrics

    Did Patroni fail over yesterday? A switchover at the same time is the likely cause.

From a terminal

verbiqo chat --pg orders "why is this replica falling behind"
verbiqo pg run orders replication
verbiqo pg query orders "SELECT datname, numbackends FROM pg_stat_database"

Reports for run: blocking-tree, long-running, idle-in-transaction, table-bloat, unused-indexes, cache-hit, replication, connections, settings-of-note. query runs one statement under the same rules as a question: a read-only transaction, catalog and statistics views only.

Something missing or unclear? Email hello@verbiqo.app.