Skip to content

Instantly share code, notes, and snippets.

View migueltaoliveira's full-sized avatar

Miguel Oliveira migueltaoliveira

View GitHub Profile
@migueltaoliveira
migueltaoliveira / createsequence.sql
Last active December 24, 2015 10:09
Criar Sequencias
CREATE SEQUENCE agentserial
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
CREATE SEQUENCE roleserial
START WITH 1
INCREMENT BY 1
@migueltaoliveira
migueltaoliveira / deadlock.sql
Last active October 18, 2016 13:52
Postgres deadlocks
#Check deadlocks
SELECT relation::regclass, * FROM pg_locks WHERE NOT granted;