Re: Analyze on large changes...

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Analyze on large changes...
Дата
Msg-id 200206112150.g5BLodZ19695@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Analyze on large changes...  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Analyze on large changes...
Список pgsql-hackers
Bruce Momjian wrote:
> Tom Lane wrote:
> > I tried to repeat this:
> > 
> > regression=# begin;
> > BEGIN
> > regression=# create table foo (f1 int);
> > CREATE
> > regression=# insert into foo [ ... some data ... ]
> > 
> > regression=# analyze foo;
> > ERROR:  ANALYZE cannot run inside a BEGIN/END block
> > 
> > This seems a tad silly; I can't see any reason why ANALYZE couldn't be
> > done inside a BEGIN block.  I think this is just a hangover from
> > ANALYZE's origins as part of VACUUM.  Can anyone see a reason not to
> > allow it?
> 
> The following patch allows analyze to be run inside a transaction.  
> Vacuum and vacuum analyze still can not be run in a transaction.

One change in this patch is that because analyze now runs in the outer
transaction, I can't clear the memory used to support each analyzed
relation.  Not sure if this is an issue.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Analyze on large changes...
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: New string functions; initdb required