You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a partitioned table setup with a cron job that calls partman.run_maintenance('table') every week. About 3 weeks ago, my job started to fail due to timeouts. I just noticed this week and I was investigating why the job failed. It seems like partman is trying to create an infinite amount of partitions when running maintenance. I'm not entirely sure why.
The error changes when I run. I've seen this error:
SQL Error [57014]: ERROR: canceling statement due to statement timeout
Where: PL/pgSQL function create_partition_time(text,timestamp with time zone[],boolean,text) line 223 at IF
PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 273 at assignment
I've also seen this:
SQL Error [57014]: ERROR: canceling statement due to statement timeout
Where: SQL statement "ALTER TABLE table ATTACH PARTITION table_p2063w03 FOR VALUES FROM ('2063-01-15 00:00:00-08') TO ('2063-01-22 00:00:00-08')"
PL/pgSQL function create_partition_time(text,timestamp with time zone[],boolean,text) line 239 at EXECUTE
PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 273 at assignment
When I remove the statement timeout, it eventually fails with this error message:
SQL Error [P0001]: ERROR: out of shared memory
CONTEXT: SQL statement "ALTER TABLE table ATTACH PARTITION table_p2312w08 FOR VALUES FROM ('2312-02-19 00:00:00-08') TO ('2312-02-26 00:00:00-08')"
PL/pgSQL function create_partition_time(text,timestamp with time zone[],boolean,text) line 239 at EXECUTE
PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 273 at assignment
DETAIL:
HINT: You might need to increase max_locks_per_transaction.
CONTEXT: PL/pgSQL function create_partition_time(text,timestamp with time zone[],boolean,text) line 479 at RAISE
PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 273 at assignment
DETAIL:
HINT:
Where: PL/pgSQL function partman.run_maintenance(text,boolean,boolean) line 402 at RAISE
The text was updated successfully, but these errors were encountered:
Thanks for the reply! Turns out there was data in the default partition. Not entirely sure how they ended up in the default since there was a partition created for that week. After moving the data, run_maintenance worked fine. Thanks!
Hi, I have a partitioned table setup with a cron job that calls
partman.run_maintenance('table')
every week. About 3 weeks ago, my job started to fail due to timeouts. I just noticed this week and I was investigating why the job failed. It seems like partman is trying to create an infinite amount of partitions when running maintenance. I'm not entirely sure why.Here's my part_config:
The error changes when I run. I've seen this error:
I've also seen this:
When I remove the statement timeout, it eventually fails with this error message:
The text was updated successfully, but these errors were encountered: