Re: ALTER STATEMENT getting blocked

2023-01-22 Thread aditya desai
Thanks All. Let me check this and get back to you. On Fri, Jan 20, 2023 at 2:36 AM MichaelDBA wrote: > Do something like this to get it without being behind other > transactions...You either get in and get your work done or try again > > DO language plpgsql $$ > BEGIN > FOR get_lock IN 1 .. 100

Re: ALTER STATEMENT getting blocked

2023-01-19 Thread MichaelDBA
Do something like this to get it without being behind other transactions...You either get in and get your work done or try again DO language plpgsql $$ BEGIN FOR get_lock IN 1 .. 100 LOOP BEGIN ALTER TABLE mytable ; EXIT; END; END LOOP; END; $$; Tom Lane wrote on 1/19/2023 12:45 P

Re: ALTER STATEMENT getting blocked

2023-01-19 Thread Tom Lane
aditya desai writes: > We have a Postgres 11.16 DB which is continuously connected to informatica > and data gets read from it continuously. > When we have to ALTER TABLE.. ADD COLUMN.. it gets blocked by the SELECTs > on the table mentioned by process above. > Is there any way to ALTER the tabl

ALTER STATEMENT getting blocked

2023-01-19 Thread aditya desai
Hi, We have a Postgres 11.16 DB which is continuously connected to informatica and data gets read from it continuously. When we have to ALTER TABLE.. ADD COLUMN.. it gets blocked by the SELECTs on the table mentioned by process above. Is there any way to ALTER the table concurrently without gett