Troubleshooting overview
This page summarizes common CloudBase PostgreSQL troubleshooting paths. First identify whether the issue is related to connection, permissions, SQL execution, HTTP API, backup and recovery, or performance.
Quick diagnosis
| Symptom | Start here |
|---|---|
| Unsure where to start, or seeing common HTTP 401/403/404/409/500 errors | Common errors |
| Cannot connect, timeout, wrong password | Connection failures |
| Empty query result or permission denied | Permission and RLS issues |
| New HTTP API field is missing or RPC function is not found | Schema cache issues |
| Backup failed or restored data is unexpected | Backup and restore issues |
| Slow queries, queued pool, lock waits | Query optimization and Logs and monitoring |
Collect information
Before self-diagnosis or reporting an issue, collect:
- Environment ID, region, database instance, and table name.
- Access method: SDK, HTTP API, DMC, Cloud Functions, CloudBase Run, or direct connection.
- Complete error message and SQLSTATE code.
- Request time, request ID, user identity, and key parameters.
- Recent changes to schema, RLS policies, role grants, or connection configuration.
Useful SQL checks
Check the current connection:
select current_database(), current_user, now();
Check whether tables exist:
select table_schema, table_name
from information_schema.tables
where table_schema = 'public'
order by table_name;
Check whether RLS is enabled:
select schemaname, tablename, rowsecurity
from pg_tables
where schemaname = 'public';
Handling principles
- Reproduce in a test environment before changing production.
- Preserve evidence before rollback, restart, or cleanup.
- Keep SQL records for permission and data fixes.
- For issues with unclear impact, pause high-risk writes first.