-- Postgres Setting:
SHOW log_connections; -- 'on'In standard circumstances, when a client initiates a new connection—like when PostgREST or Supavisor establishes a direct link with the database—the successful connection gets logged as an authorized/authenticated/received event.
These events occur frequently, sometimes dozens or hundreds of times per minute, and typically include details like the server's IP, application_name (if provided), and the connecting database user. While abundant, most of these can be disregarded as background noise.
-- Postgres Setting:
SHOW log_checkpoints; -- 'on'PostgreSQL will temporarily store recent changes to a special file called a Write-Ahead-Log (WAL). When the database transfers the the data into a different format, a checkpoint event is logged. This is normal and these logs can be disregarded as noise for the vast majority of users.
-- Postgres Setting:
SHOW auto_explain.log_min_duration; -- '10s'Queries that run for more than 10 seconds EXPLAIN plan will be logged. Unless you intend to run long transactions, if several are showing up in your database, it is a sign that your queries need to be optomized or your database is struggling.
To correct, consider inspecting your Dashboard's Query Performance Page and setting up a Supabase Grafana Board to increase visibility of your database metrics.
-- Postgres Setting:
SHOW cron.log_statement; -- 'on'log the id of a pg_cron job when it is initiated. Unless you suspect your custom cron jobs are failing, this can be ignored.
-- Postgres Setting:
SHOW log_min_messages; -- 'warning'Some events are logged based on severity. The log_min_messages variable determines what is severe enough to log. Here are the severity thresholds from the Postgres docs. By default WARNING, ERROR, LOG, FATAL, and PANIC events are recorded.
| Severity | Usage |
|---|---|
| DEBUG1 .. DEBUG5 | Provides successively-more-detailed information for use by developers. |
| INFO | Provides information implicitly requested by the user, e.g., output from VACUUM VERBOSE. |
| NOTICE | Provides information that might be helpful to users, e.g., notice of truncation of long identifiers. |
| WARNING | Provides warnings of likely problems, e.g., COMMIT outside a transaction block. |
| ERROR | Reports an error that caused the current command to abort. |
| LOG | Reports information of interest to administrators, e.g., checkpoint activity. |
| FATAL | Reports an error that caused the current session to abort. |
| PANIC | Reports an error that caused all database sessions to abort. |