Re: Removal of currtid()/currtid2() and some table AM cleanup

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Removal of currtid()/currtid2() and some table AM cleanup
Дата
Msg-id 20200623050233.GJ50978@paquier.xyz
обсуждение исходный текст
Ответ на Re: Removal of currtid()/currtid2() and some table AM cleanup  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Removal of currtid()/currtid2() and some table AM cleanup  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Tue, Jun 23, 2020 at 01:29:06PM +0900, Michael Paquier wrote:
> Sorry, but I am not quite sure what is the relationship between
> UseDeclareFetch and currtid2()?  Is that related to the use of
> SQL_CURSOR_KEYSET_DRIVEN?  The only thing I can be sure of here is
> that we never call currtid2() in any of the regression tests present
> in the ODBC code for any of the scenarios covered by installcheck-all,
> so that does not really bring any confidence that removing currtid2()
> is a wise thing to do, because we may silently break stuff.  If the
> function is used, it would be good to close the gap with a test to
> stress that at least in the driver.

Actually, while reviewing the code, the only code path where we use
currtid2() involves positioned_load() and LATEST_TUPLE_LOAD.  And the
only location where this happens is in SC_pos_reload_with_key(), where
I don't actually see how it would be possible to not have a keyset and
still use a CTID, which would led to LATEST_TUPLE_LOAD being used.  So
could it be possible that the code paths of currtid2() are actually
just dead code?
--
Michael

Вложения

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

Предыдущее
От: Eric Ridge
Дата:
Сообщение: Re: Threading in BGWorkers (!)
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Resetting spilled txn statistics in pg_stat_replication