Should we document the behaviour of TRUNCATE skipping repeated relations?

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Should we document the behaviour of TRUNCATE skipping repeated relations?
Дата
Msg-id CALj2ACULUgJPt-FT-eUHC1ArKmcFX0qxEdmPFkrc2HtQ6Aa7UQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

The TRUNCATE command currently skips processing repeated relations
(see if (list_member_oid(relids, myrelid)) continue; in
ExecuteTruncate) because the same relation can't be truncated more
than once as it will be under "use" during the txn. For instance, in
the following use cases 1) TRUNCATE foo, foo; 2) TRUNCATE foo, ONLY
foo, foo; first instance of relation foo is taken into consideration
for processing and other relation instances ( and options specified if
any) are ignored.

I feel that users should be aware of this behaviour so that they can
correct the commands if written in such a way and don't report
unexpected behaviour especially for the use cases like (2) where they
might expect ONLY foo behaviour but it is skipped by the server.
AFAICS, I don't find it anywhere in the docs, should we document it as
a note?

Thoughts?

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



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Replication slot stats misgivings