Re: BUG #4913: Row missing from primary key index
От | Mathieu De Zutter |
---|---|
Тема | Re: BUG #4913: Row missing from primary key index |
Дата | |
Msg-id | d4468d970907100649g609702c6kb032ab8ef99173d3@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #4913: Row missing from primary key index (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: BUG #4913: Row missing from primary key index
|
Список | pgsql-bugs |
On Fri, Jul 10, 2009 at 2:02 AM, Alvaro Herrera <alvherre@commandprompt.com>wrote: > What do the INSERT lines look like? Is it a trigger, an insert called > directly by the application? How is the sequence involved -- lastval(), > nextval(), does the code just leave the column out for the default to fire? > > * This is the INSERT query, called from PHP/Apache INSERT INTO log_event (user_id, ip, action_id, object1_id, object2_id, event_timestamp) VALUES ($1, $2, $3, $4, $5, NOW()) So the timestamp is generated by NOW(), and the pkey is generated by using the default value (nextval). * There are no UPDATE queries. * There a few DELETE queries that are lauched daily (called from PHP/cron) DELETE FROM log_event WHERE action_id = $1 AND event_timestamp < NOW() - '1 month'::interval (some events are not worthy of archiving individually, we just keep totals) Regards, Mathieu
В списке pgsql-bugs по дате отправления: