Re: Implement UNLOGGED clause for COPY FROM

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Implement UNLOGGED clause for COPY FROM
Дата
Msg-id CAA4eK1KXfQYhq4Ufyi=AeBE2CicZSceg5gURW9TsJAEEES_Bpw@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Implement UNLOGGED clause for COPY FROM  ("osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>)
Список pgsql-hackers
On Wed, Jul 22, 2020 at 11:11 AM osumi.takamichi@fujitsu.com
<osumi.takamichi@fujitsu.com> wrote:
>
> > If you are going to suggest users not to replicate such tables then why can't you
> > suggest them to create such tables as UNLOGGED in the first place?  Another
> > idea could be that you create an 'unlogged'
> > table, copy the data to it.  Then perform Alter Table .. SET Logged and attach it to
> > the main table.  I think for this you need the main table to be partitioned but I
> > think if that is possible then it might be better than all the hacking you are
> > proposing to do in the server for this special operation.
> Thank you for your comment.
>
> At the beginning, I should have mentioned this function was
> for data warehouse, where you need to load large amounts of data
> in the shortest amount of time.
> Sorry for my bad explanation.
>
> Based on the fact that data warehouse cannot be separated from
> usage of applications like B.I. tool in general,
> we cannot define unlogged table at the beginning easily.
> Basically, such tools don't support to define unlogged table as far as I know.
>
> And if you want to do so, you need *modification or fix of existing application*
> which is implemented by a third party and commercially available for data analytics.
> In other words, to make CREATE UNLOGGED TABLE available in that application,
> you must revise the product's source code of the application directly,
> which is an act to invalidate the warranty from the software company of B.I. tool.
> In my opinion, it would be like unrealistic for everyone to do so.
>

So, does this mean that the need for data warehouse application can be
satisfied if the table would have been an 'UNLOGGED'?  However, you
still need 'COPY UNLOGGED ..' syntax because they don't have control
over table definition.  I think if this is the case, then the
application user should find a way for this.  BTW, if the application
is anyway going to execute a PG native syntax like 'COPY UNLOGGED ..'
then why can't they simply set tables as UNLOGGED by using Alter
Table?

IIUC, I think here the case is that the applications are not allowed
to change the standard definitions of tables owned/created by B.I tool
and instead they use some Copy Unlogged sort of syntax provided by
other databases to load the data at a faster speed and now they expect
PG to also have a similar alternative.  If that is true, then it is
possible that those database doesn't have 'Create Unlogged Table ...'
types of syntax which PG has and that is why they have provided such
an alternative for Copy kind of commands.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel copy
Следующее
От: "tsunakawa.takay@fujitsu.com"
Дата:
Сообщение: RE: Global snapshots