![Screenshot 2024-05-04 at 8 53 34 PM](https://private-user-images.githubusercontent.com/91111415/327982327-1dd93a51-3e59-4b42-8183-b744cf073599.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2NDQ4ODUsIm5iZiI6MTcxODY0NDU4NSwicGF0aCI6Ii85MTExMTQxNS8zMjc5ODIzMjctMWRkOTNhNTEtM2U1OS00YjQyLTgxODMtYjc0NGNmMDczNTk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE3VDE3MTYyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwM2JiNWE1Y2YwYzk2NzVmYWYyOGQyOTQ0ZWEzZDI5YjNmODJhMjNkNmEwYzIyOTAxNWI1ZmNiYTBiNjExNTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.g3tGHsC_KulmsR6hj2s_d0v85q-yODlLEAGlRoIsDxU)
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.
![Screenshot 2024-05-04 at 8 53 34 PM](https://private-user-images.githubusercontent.com/91111415/327984117-6b45ca7f-1ead-4a9d-9302-807e4e5e14c2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2NDQ4ODUsIm5iZiI6MTcxODY0NDU4NSwicGF0aCI6Ii85MTExMTQxNS8zMjc5ODQxMTctNmI0NWNhN2YtMWVhZC00YTlkLTkzMDItODA3ZTRlNWUxNGMyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE3VDE3MTYyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiNDY1MmNjMDg5ZjQ1NjM0MTI3ODNiZTUyZmY5NzdjYTk5ZDlkMmFiOTkzZWIwYTY5YjU4MmU4MWZjNTg4MzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xGKIILYc3jH1iAc3wUVYsViKoHSb8R1h2bq4-hUhRJQ)
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.
![Screenshot 2024-05-04 at 10 36 00 PM](https://private-user-images.githubusercontent.com/91111415/327987941-59989224-29aa-46a5-910a-a8afa2de9a40.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2NDQ4ODUsIm5iZiI6MTcxODY0NDU4NSwicGF0aCI6Ii85MTExMTQxNS8zMjc5ODc5NDEtNTk5ODkyMjQtMjlhYS00NmE1LTkxMGEtYThhZmEyZGU5YTQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE3VDE3MTYyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQxNjVjYjc0ZTIwZDVmNDE0ZjM0ZWM3Y2M3ZDcxYmViMzMwN2U3NzIwNzMyYzAzNDZmNjNjNDIyNWZiOGFkMTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.UiSO6gKpe8Q6159b85f4Z-LFq5e6BdbqqT-Ox4H5ljE)
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.
![cron](https://private-user-images.githubusercontent.com/91111415/327988480-b41cff72-e7a6-4f1c-9786-fe2f44898284.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2NDQ4ODUsIm5iZiI6MTcxODY0NDU4NSwicGF0aCI6Ii85MTExMTQxNS8zMjc5ODg0ODAtYjQxY2ZmNzItZTdhNi00ZjFjLTk3ODYtZmUyZjQ0ODk4Mjg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE3VDE3MTYyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlNjQxOGU5ZWJhM2FiMWY1ODM1YjM1YWRiODIyZTQ4NjMyN2JhZTExZTVmM2UzZTdiMGEzN2EyZTZhMmY5MmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vVjan5EzcxwdBVUUR7UhDlaG_8Ksp3XTp86dCSaWOQE)
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.
![Screenshot 2024-05-06 at 12 00 57 AM](https://private-user-images.githubusercontent.com/91111415/328077244-bb4fc08b-407f-489c-89ca-27df9794b4e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2NDQ4ODUsIm5iZiI6MTcxODY0NDU4NSwicGF0aCI6Ii85MTExMTQxNS8zMjgwNzcyNDQtYmI0ZmMwOGItNDA3Zi00ODljLTg5Y2EtMjdkZjk3OTRiNGU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE3VDE3MTYyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM2MjcyYzczODg2ZDljODc3N2UyYzZkMGRlY2YyOTA2MTRjYTgyNGZiM2YwYWJiYzllZTliMGExNzI2N2ZlY2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5AtOpCZkIzg2rlJ3Sa5nZpvhRuGNTVWdt9Ew_wPxYQA)
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.
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. |
By default WARNING
, ERROR
, LOG
, FATAL
, and PANIC
events are recorded. Unless you create custom logs, all events you'll encounter, apart from routine events, will be related to failures or warnings like query timeouts, foreign key constraint violations, and improper disconnects.