Re: ALTER TABLE ... NOREWRITE option

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: ALTER TABLE ... NOREWRITE option
Дата
Msg-id 20121206194341.GA31249@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: ALTER TABLE ... NOREWRITE option  ("Petr Jelinek" <pjmodos@pjmodos.net>)
Ответы Re: ALTER TABLE ... NOREWRITE option
Список pgsql-hackers
On 2012-12-06 20:27:33 +0100, Petr Jelinek wrote:
> > -----Original Message-----
> > From: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-
> > owner@postgresql.org] On Behalf Of Andres Freund
> > Sent: 06 December 2012 20:04
> > To: Simon Riggs
> > Cc: Robert Haas; Dimitri Fontaine; Josh Berkus;
> pgsql-hackers@postgresql.org
> > Subject: Re: [HACKERS] ALTER TABLE ... NOREWRITE option
> > > I don't see any difference between an event trigger and these
> > statements...
> > >
> > > BEGIN;
> > > ALTER TABLE x ...;
> > > SELECT somefunction();
> > > ALTER TABLE y ...;
> > > COMMIT;
> >
> > Event triggers get called *during* the ALTER TABLE. So if were not careful
> > they see something thats not easy to handle.
> >
>
> I thought the point of this was to call the trigger *before* anything
> happens.

Just because the rewrite hasn't started yet, doesn't mean nothing else
has been changed.

Note, I am not saying this is impossible or anything, the original point
drawn into question was that we need to be especially careful with
choosing callsites and thats its not trivial to do right.

Greetings,

Andres Freund

--Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: "Petr Jelinek"
Дата:
Сообщение: Re: ALTER TABLE ... NOREWRITE option
Следующее
От: "Petr Jelinek"
Дата:
Сообщение: Re: ALTER TABLE ... NOREWRITE option