query against pg_locks leads to large memory alloc - Mailing list pgsql-performance

From Dave Owens
Subject query against pg_locks leads to large memory alloc
Date
Msg-id CA+OQrzhdtpC-9enDpY_PTue3_eh9xxmP-z51fJHFqezvhJ-9Nw@mail.gmail.com
Whole thread Raw
Responses Re: query against pg_locks leads to large memory alloc  (Matheus de Oliveira <matioli.matheus@gmail.com>)
List pgsql-performance
Hi,

I have a tool that is trying to collect stats from postgres (v9.1.13).
postgres attempts to allocate more memory than is allowed:

SELECT mode, count(mode) AS count FROM pg_locks GROUP BY mode ORDER BY mode;
ERROR:  invalid memory alloc request size 1459291560

Memory-related configs from the server:

shared_buffers = 10000MB
work_mem = 15MB
maintenance_work_mem = 400MB
effective_cache_size = 50000MB
max_locks_per_transaction = 9000
max_pred_locks_per_transaction = 40000

The machine is running CentOS 6, a 32-core AMD 6276 processor, and is
configured with 64GB of memory.  Transparent Huge Pages are disabled
:-)

Thanks in advance for your time and expertise.

Dave Owens


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: select on index column,why PG still use seq scan?
Next
From: Matheus de Oliveira
Date:
Subject: Re: query against pg_locks leads to large memory alloc