> enable_seqscan = 'off' Why is this here ? I think when people set this, it's because they "want to use more index scans to make things faster". But index scans aren't necessarily faster, and this tries to force their use even when it will be slower. It's better to address the queries that are slow (or encourage index scans by decreasing random_page_cost). > maintenance_work_mem = '64MB' > autovacuum_max_workers = '20' > vacuum_cost_limit = '2000' > autovacuum_vacuum_scale_factor = '0.0002' > autovacuum_analyze_scale_factor = '0.00001' This means you're going to use up to 20 processes simultaneously running vacuum (each of which may use 64MB memory). What kind of storage does the server have? Can it support 20 background processes reading from disk, in addition to other processs ? Justin Pryzby <pryzby@xxxxxxxxxxxxx> 于2022年5月25日周三 01:40写道: > > What postgres version ? > > How was it installed ? From souce? From a package ? What about this ? I'm not sure how/if this would affect memory allocation, but if the server is slow, processes will be waiting longer, rather than completing quickly, and using their RAM for a longer period... Does the postgres user have any rlimits set ? Check: ps -fu postgres # then: sudo cat /proc/2948/limits