While inserting a lot of data into postgresql 9.1. using a Python script, we are getting the following error on this query:
X: psycopg2.ProgrammingError in /home/hosting/apps/X X_psycopg.py:162 in : Execute 'execute' ( SELECT * FROM xml_fifo.fifo WHERE type_id IN (1,2) ORDER BY type_id, timestamp LIMIT 10 ): out of shared memory HINT: You might need to increase max_pred_locks_per_transaction
We increased this number but still we get a out of shared memory (max_pred_locks_per_transaction = 192). Everytime we start the script again it runs for some time then gives this error message. On Postgres 8.1 we did not have this problem.
Here is a piece of the postgresql log file:
2012-06-28 02:55:43 CEST HINT: Use the escape string syntax for backslashes, e.g., E'\\'. 2012-06-28 02:55:43 CEST WARNING: nonstandard use of \\ in a string literal at character 271 2012-06-28 02:55:43 CEST HINT: Use the escape string syntax for backslashes, e.g., E'\\'. 2012-06-28 02:55:43 CEST WARNING: nonstandard use of \\ in a string literal at character 271 2012-06-28 02:55:43 CEST HINT: Use the escape string syntax for backslashes, e.g., E'\\'. 2012-06-28 02:56:11 CEST WARNING: there is already a transaction in progress 2012-06-28 02:57:01 CEST WARNING: there is already a transaction in progress 2012-06-28 02:57:01 CEST ERROR: out of shared memory 2012-06-28 02:57:01 CEST HINT: You might need to increase max_pred_locks_per_transaction. 2012-06-28 02:57:01 CEST STATEMENT: SELECT * FROM xml_fifo.fifo WHERE type_id IN (1,2) ORDER BY type_id ASC, timestamp LIMIT 10 2012-06-28 02:57:01 CEST ERROR: out of shared memory 2012-06-28 02:57:01 CEST HINT: You might need to increase max_pred_locks_per_transaction. 2012-06-28 02:57:01 CEST STATEMENT: SELECT * FROM xml_fifo.fifo WHERE type_id IN (1,2) ORDER BY type_id ASC, timestamp LIMIT 10
What would be the problem?