Bogus "Non-functional update" notices
От | Tom Lane |
---|---|
Тема | Bogus "Non-functional update" notices |
Дата | |
Msg-id | 11165.901409923@sss.pgh.pa.us обсуждение исходный текст |
Список | pgsql-hackers |
With fairly current sources (last cvs update on 7/20), I am seeing occasional occurrences of NOTICE: Non-functional update, only first update is performed I think this is a bug. The update commands that are triggering this message *are* getting executed. I looked at the sources and couldn't even understand what condition was being tested to generate the message. The source code looks like it's trying to disallow more than one update to the same tuple within a transaction, which is so silly that I have to be misreading it... Here is an example trace of my application's interaction with the server: // Tuple 134537 is created here: QUERY: BEGIN TRANSACTION; LOCK marketorderhistory RESULT: DELETE 0 // several other tuples inserted or updated in this transaction QUERY: INSERT INTO marketorderhistory (accountID, instrumentID, orderType, numContracts, orderTime, simStatus, realStatus,sequenceNo, orderPrice, orderDivisor, ifDonePrice) VALUES(5, 62, 'S', 5, '1998-05-20 15:20:00 GMT', 'P', '-',nextval('marketorderhistory_Seq'), 11969, 100, 11849) RESULT: INSERT 134537 1 QUERY: END TRANSACTION; NOTIFY marketorderhistory RESULT: NOTIFY // many transactions later, the app wants to update this tuple: QUERY: BEGIN TRANSACTION; LOCK marketorderhistory RESULT: DELETE 0 QUERY: UPDATE marketorderhistory SET completionTime = '1998-05-21 15:20:00 GMT' WHERE oid = 134537::oid AND completionTimeIS NULL; UPDATE marketorderhistory SET simStatus = 'X', sequenceNo = nextval('marketorderhistory_Seq') WHEREoid = 134537::oid NOTICE: Non-functional update, only first update is performed RESULT: UPDATE 1 // a couple other tuples inserted or updated QUERY: END TRANSACTION; NOTIFY marketorderhistory RESULT: NOTIFY External inspection verifies that both updates did take effect. The thing that's weird is that this only happens occasionally, say about twice out of every thousand essentially identical updates. I don't know enough about the backend innards to have much chance of figuring out what's going on. Any ideas? Is anyone else even seeing this? regards, tom lane
В списке pgsql-hackers по дате отправления: