Re: Implement UNLOGGED clause for COPY FROM

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Implement UNLOGGED clause for COPY FROM
Дата
Msg-id 2056330.1594389660@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: Implement UNLOGGED clause for COPY FROM  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
Ответы RE: Implement UNLOGGED clause for COPY FROM  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
Список pgsql-hackers
"osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com> writes:
>> Aside from that, though, how does this improve upon the existing capability to copy into an unlogged temporary
table?

> [>] unlogged temporary table can’t be inherited over sessions first of all.

Unlogged tables don't have to be temporary.

> And unlogged table needs to be recreated due to startup truncation of the table’s content
> when the server crashes.

Indeed, and your proposed feature would extend that un-safety to tables
that are NOT marked unlogged, which is not good.

AFAICS, we can already accomplish basically the same thing as what you
want to do like this:

alter table foo set unlogged;
copy foo from ...;
alter table foo set logged;

The mechanics of that are already well worked out.  It's expensive,
no doubt about that, but I think you're just fooling yourself to
imagine that any shortcuts are possible.  A mix of unlogged and logged
data is never going to work safely.

> To achieve this, we have to
> consider a new idea like loaded data’d be added
> at the end of the all other pages and detach those
> if the server crashes during the UNLOGGED loading processing for example.

You keep on ignoring the indexes... not to mention replication.

            regards, tom lane



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

Предыдущее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: Implement UNLOGGED clause for COPY FROM
Следующее
От: Tom Lane
Дата:
Сообщение: Re: distribute_restrictinfo_to_rels if restrictinfo contains volatile functions