1
DROP SCHEMA a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z

When i am running above query, i am getting

ERROR:  out of shared memory
HINT:  You might need to increase max_locks_per_transaction.

I there any other way to drop multiple schemas in postgres.

1
  • Dropping them one by one? And probably commit after each one or at least some n ones. Commented Dec 27, 2018 at 6:44

2 Answers 2

2

Try drop schema <schemaname> cascade . With this, you can delete only one schema at a time though. Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

0

try COMMIT to complete the transaction after each DROP SCHEMA

DROP SCHEMA a; COMMIT;
DROP SCHEMA b; COMMIT;
DROP SCHEMA c; COMMIT;
DROP SCHEMA d; COMMIT;
DROP SCHEMA e; COMMIT;
DROP SCHEMA f; COMMIT;
DROP SCHEMA g; COMMIT;
DROP SCHEMA h; COMMIT;
DROP SCHEMA i; COMMIT;
DROP SCHEMA j; COMMIT;
DROP SCHEMA k; COMMIT;
DROP SCHEMA l; COMMIT;
DROP SCHEMA m; COMMIT;
DROP SCHEMA n; COMMIT;
DROP SCHEMA o; COMMIT;
DROP SCHEMA p; COMMIT;
DROP SCHEMA q; COMMIT;
DROP SCHEMA r; COMMIT;
DROP SCHEMA s; COMMIT;
DROP SCHEMA t; COMMIT;
DROP SCHEMA u; COMMIT;
DROP SCHEMA v; COMMIT;
DROP SCHEMA w; COMMIT;
DROP SCHEMA x; COMMIT;
DROP SCHEMA y; COMMIT;
DROP SCHEMA z; COMMIT;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.