Postgresql – Postgres locks and deadlock questions
I have a postgres table: CREATE TABLE clicks ( page_id UUID REFERENCES pages (id) ON DELETE CASCADE, status TEXT NOT NULL, click BIGINT NOT NULL, PRIMARY KEY (page_id, status) ); and two execution blocks: code_block_1: BEGIN; LOCK TABLE clicks IN…