Re: Server error

Поиск
Список
Период
Сортировка
От Erik Ronström
Тема Re: Server error
Дата
Msg-id 20030508203549.67761.qmail@web13807.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Server error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Server error  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Server error  (Dennis Gearon <gearond@cvc.net>)
Список pgsql-general
Hello,

Still stuck with the same error. Finally managed to upgrade from 7.2.1
to 7.2.4, and realized that the problem is still there. Shit! I've not
yet been able to reproduce the problem on another location, but at
least I've isolated it a bit:

I have a function which creates a "cache" table with a subset of rows
from another table (CREATE TABLE new AS SELECT ... FROM old WHERE ...).
Then it adds a foreign key (ALTER TABLE new ADD CONSTRAINT ref FOREIGN
KEY ... REFERENCES old). Everything is fine so far. Now, if I drop the
new table and run the function again, postgres crashes.

Things to note:
1) If the old table doesn't contain any rows *when running the query
the first time*, there is no crash the second time.
2) If I execute the queries from the function "manually", typing them
into psql, everything works fine.

Looks to me like there is some sort of cleanup problem, since it is
almost always the second run (in each session) that crashes.

One question is: is it always safe to create a foreign key constraint,
even when the table contains data?

Erik

__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer


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

Предыдущее
От: Kathy Zhu
Дата:
Сообщение: jdbc connection process size
Следующее
От: Diogo de Oliveira Biazus
Дата:
Сообщение: About CLUSTER on GIST/tsearch index