Re: [GENERAL] Autovacuum stuck for hours, blocking queries

Поиск
Список
Период
Сортировка
От Rakesh Kumar
Тема Re: [GENERAL] Autovacuum stuck for hours, blocking queries
Дата
Msg-id BN6PR2201MB15541F974315051F254D08C68C5D0@BN6PR2201MB1554.namprd22.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Autovacuum stuck for hours, blocking queries  (Hannes Erven <hannes@erven.at>)
Ответы Re: [GENERAL] Autovacuum stuck for hours, blocking queries  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
LOCK TABLE yourtable <a suitable LOCKMODE>;
CREATE TEMPORARY TABLE keep AS SELECT * FROM yourtable WHERE <keep>;
TRUNCATE yourtable;
INSERT INTO yourtable SELECT * from keep;
COMMIT;
===
the above snippet assumes truncate in PG can be in a transaction. In other words, while truncate by itself
is atomic, it can't be rolled back. So in the above case, if "INSERT INTO yourtable SELECT * from keep;" and
we rollback, will it rollback yourtable.

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

Предыдущее
От: Richard Brosnahan
Дата:
Сообщение: [GENERAL] Re: [GENERAL] PostgreSQL mirroring from RPM install to RPM install-revisited
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] PostgreSQL mirroring from RPM install to RPMinstall-revisited