Re: recovering from "found xmin ... from before relfrozenxid ..."

Поиск
Список
Период
Сортировка
От Andrey M. Borodin
Тема Re: recovering from "found xmin ... from before relfrozenxid ..."
Дата
Msg-id 551B252D-E701-4C8C-8DB2-A3C11DD9433C@yandex-team.ru
обсуждение исходный текст
Ответ на Re: recovering from "found xmin ... from before relfrozenxid ..."  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Ответы Re: recovering from "found xmin ... from before relfrozenxid ..."  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Список pgsql-hackers

> 24 июля 2020 г., в 14:05, Ashutosh Sharma <ashu.coek88@gmail.com> написал(а):
>
> Attached is the patch that adds heap_force_kill(regclass, tid[]) and heap_force_freeze(regclass, tid[]) functions
whichRobert mentioned in the first email in this thread. The patch basically adds an extension named pg_surgery that
containsthese functions.  Please have a look and let me know your feedback. Thank you. 

Thanks for the patch!
I have just few random thoughts.

I think here we should report that we haven't done what was asked.
+            /* Nothing to do if the itemid is unused or already dead. */
+            if (!ItemIdIsUsed(itemid) || ItemIdIsDead(itemid))
+                continue;

Also, should we try to fix VM along the way?
Are there any caveats with concurrent VACUUM? (I do not see any, just asking)
It would be good to have some checks for interrupts in safe places.

I think we should not trust user entierly here. I'd prefer validation and graceful exit, not a core dump.
+        Assert(noffs <= PageGetMaxOffsetNumber(page));

For some reason we had unlogged versions of these functions. But I do not recall exact rationale..
Also, I'd be happy if we had something like "Restore this tuple iff this does not break unique constraint". To do so we
needto sort tids by xmin\xmax, to revive most recent data first. 

Thanks!

Best regards, Andrey Borodin.


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

Предыдущее
От: Chris Travers
Дата:
Сообщение: Re: Making CASE error handling less surprising
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk