Re: [HACKERS] Indixing problems...

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Indixing problems...
Дата
Msg-id 199809090425.AAA03598@candle.pha.pa.us
обсуждение исходный текст
Ответ на Indixing problems...  (Vadim Mikheev <vadim@krs.ru>)
Список pgsql-hackers
> David Hartwig wrote:
> >
> > This is the same problem as that has been pestering me for two weeks.
> >
> > Billy, please try this simple test:
> >
> > CREATE TABLE foo (bar int);
> >
> > \d foo
> >
> > CREATE INDEX foo_idx ON foo USING btree (bar);
> >
> > \d foo
> >
> > Is foo gone?
>
> Please apply this patch...
>
> Vadim

> *** src/backend/catalog/index.c.orig    Wed Sep  9 11:14:40 1998
> --- src/backend/catalog/index.c    Wed Sep  9 11:15:50 1998
> ***************
> *** 1424,1433 ****
>
>           newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace);
>           heap_replace(pg_class, &tuple->t_ctid, newtup);
> -         pfree(newtup);
>           CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
>           CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
>           CatalogCloseIndices(Num_pg_class_indices, idescs);
>       }
>
>       if (!IsBootstrapProcessingMode())
> --- 1424,1433 ----
>
>           newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace);
>           heap_replace(pg_class, &tuple->t_ctid, newtup);
>           CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
>           CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
>           CatalogCloseIndices(Num_pg_class_indices, idescs);
> +         pfree(newtup);
>       }
>
>       if (!IsBootstrapProcessingMode())

Wow, this is GREAT.  Vadim saves me AGAIN.

I did write this code as part of the megpatch, because tuple allocations
where not being properly de-allocated.

This clearly is a bug, and hopefully it will be the fix I have been
looking for.  I was supposed to get on David Hartwig's AIX machine
tomorrow, so if this fixes all our problems, we can move on to more
productive items.

Again, sorry to have introduced this bug into the code, and thanks again
to Vadim for finding it.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] Indixing problems...
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] Indixing problems...