Deflekt connects to PostgreSQL with a dedicated read only role, ideally on a replica, so every investigation can check real data and Data Watch can catch silent bugs every night.
Most support questions end with someone opening a database console. Is this invoice really unpaid? When did this account stop syncing? How many other customers are in the same state? The developer on duty stops what they are doing, writes a query, and pastes the result in a chat. Deflekt does that part itself, with access that cannot change anything. The PostgreSQL connector is live today.
Deflekt asks for a role that can only read, ideally on a replica so investigations never compete with your production traffic. Queries run from Deflekt workers inside your own network, and the credentials are encrypted at rest and scoped to one project. A typical role looks like this:
CREATE ROLE deflekt_readonly WITH LOGIN PASSWORD 'change-me';
GRANT CONNECT ON DATABASE app_production TO deflekt_readonly;
GRANT USAGE ON SCHEMA public TO deflekt_readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO deflekt_readonly;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO deflekt_readonly;
ALTER ROLE deflekt_readonly SET default_transaction_read_only = on;
ALTER ROLE deflekt_readonly SET statement_timeout = '30s';
You can leave out tables Deflekt should never see by granting SELECT table by table instead of on the whole schema.
Deflekt never inserts, updates or deletes, and every repair waits for a human. Read how it catches silent data bugs, follow the silent export case file, or use Metabase instead of a direct connection.