Note that there are some explanatory texts on larger screens.

plurals
  1. POpsycopg2 out of shared memory and hints of increase max_pred_locks_per_transaction
    text
    copied!<p>While inserting a lot of data into postgresql 9.1. using a Python script, we are getting the following error on this query:</p> <pre> 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 </pre> <p>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.</p> <p>Here is a piece of the postgresql log file:</p> <pre> 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 </pre> <p>What would be the problem?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload