Issue with delete

Поиск
Список
Период
Сортировка
От Rohit Rajput
Тема Issue with delete
Дата
Msg-id 266147493.2758919.1624525689006@mail.yahoo.com
обсуждение исходный текст
Ответы Re: Issue with delete  (Holger Jakobs <holger@jakobs.com>)
Re: Issue with delete  (Keith <keith@keithf4.com>)
Список pgsql-admin
Good day everyone,

I have few tables where i need to delete above 50 million rows each. Since i dont want to delete them all in one shot and block my table for extended time, i am trying to use limit with delete but its giving me error every time. May i please get some assistance here? Thanks

Here is what i am running:

delete from mytable where id in (select id from mytable where condition=true limit 1000);

where i run this, i get following error:

    Error: current transaction is aborted, commands ignored until end of transaction block.
SQL state: 25P02.


I am running it in RDS.


TIA, Best,
Rohit

В списке pgsql-admin по дате отправления:

Предыдущее
От: Vijaykumar Jain
Дата:
Сообщение: Re: Optimizing materialize views for refresh
Следующее
От: Holger Jakobs
Дата:
Сообщение: Re: Issue with delete