Re: TRUNCATE on foreign table

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: TRUNCATE on foreign table
Дата
Msg-id CALj2ACVNrFcv0y2QFEPzL5gAQtsLBjAD19PYHpqE9fMNzF9OGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: TRUNCATE on foreign table  (Zhihong Yu <zyu@yugabyte.com>)
Ответы Re: TRUNCATE on foreign table
Список pgsql-hackers
On Sat, Apr 3, 2021 at 8:31 PM Zhihong Yu <zyu@yugabyte.com> wrote:
> w.r.t. Bharath's question on using hash table, I think the reason is that the search would be more efficient:

Generally, sequential search would be slower if there are many entries
in a list. Here, the use case is to store all the foreign table ids
associated with each foreign server and I'm not sure how many foreign
tables will be provided in a single truncate command that belong to
different foreign servers. I strongly feel the count will be less and
using a list would be easier than to have a hash table. Others may
have better opinions.

> Should the hash table be released at the end of ExecuteTruncateGuts() ?

If we go with a hash table and think that the frequency of "TRUNCATE"
commands on foreign tables is heavy in a local session, then it does
make sense to not destroy the hash, otherwise destroy the hash.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: Stronger safeguard for archive recovery not to miss data
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Unused variable found in AttrDefaultFetch