Is there a way for checking an empty table has inserts and deleted for a while?
I want to drop unused tables. I listed empty tables to make sure that tables not getting inserts and deletes (using such as temporary table) within 1 week.
Postgres SELECT FOR UPDATE, actually update row when transaction is running
I’m building an application which reads tasks from Posgtres table to perform calculation. My goal is reaching concurrency in performing such tasks.
SQL current transaction is aborted and commands ignored, how to fix it?
begin transaction; — start a transaction — first SQL command with savepoint SAVEPOINT sp_1; — your first INSERT command goes here — if it fails, you can rollback to savepoint sp_1 INSERT INTO “table_name” (“id”,”owner_id”) VALUES (1, 100); EXCEPTION WHEN others THEN ROLLBACK TO SAVEPOINT sp_1; RAISE NOTICE ‘The first INSERT failed: %’, SQLERRM; release […]