Skip to content

gnomeby/postgresql-deadlock-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postgresql-deadlock-test

PostgreSQL deadlock test scripts. Aim is using in educational purposes.

Install

  • Create new virtualenv
  • Install requirements
  • Create empty DB in PostgreSQL
  • Change credentials in db.py
  • Create Table with data
CREATE TABLE public.users
(
  id integer NOT NULL DEFAULT nextval('users_id_seq'::regclass),
  nickname text,
  balance numeric,
  CONSTRAINT "primary" PRIMARY KEY (id)
)
WITH (OIDS=FALSE);

INSERT INTO users (id, nickname, balance) VALUES (2, 'Beta', 160.0);
INSERT INTO users (id, nickname, balance) VALUES (1, 'Alpha', 260.0);
INSERT INTO users (id, nickname, balance) VALUES (3, 'Gamma', 510.50);

Using

python deadlock_test.py

About

PostgreSQL deadlock test, education repository.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages