BUG #16254: SQL raises error dsa_allocate could not find 4 free pages

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: smartyru(at)gmail(dot)com
Subject: BUG #16254: SQL raises error dsa_allocate could not find 4 free pages
Date: 2020-02-11 12:34:28
Message-ID: 16254-aefd2302eadadb8f@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16254
Logged by: Алексей Божков
Email address: smartyru(at)gmail(dot)com
PostgreSQL version: 10.5
Operating system: CentOS Linux release 7.5.1804 (Core)
Description:

After refactoring of a SQL query during run of new version of the query
given below
select count( distinct case when proc_error_cd = '000' then 'ok@' end ||
muid || '@' || email ),
count( distinct case when proc_error_cd = '000' then null else 'err@' end ||
muid || '@' || email )
into v_in_cnt, v_in_cnt_err
from cb.T co
where check_dt_msk between v_check_dt_min and v_check_dt_max
and cashback <> 0
and calc_batch_id = any(v_calc_batch_id_ar)
and muid = any (v_muid_ar);

where
v_muid_ar, v_calc_batch_id_ar - are arrays of (183 and 4167 scalar elements
populated below)
select array_agg(distinct muid)
into v_muid_ar
from cb.rsp_tst
where txncode in ('29', '18')
and tsid::int = v_tsid;

select array_agg(distinct calc_batch_id)
into v_calc_batch_id_ar
from cbf.calc_batch_dt_range
where batch_group_id = v_tsid;
I got error dsa_allocate could not find 4 free pages

Old version of query runs without errors:
select count( distinct case when proc_error_cd = '000' then 'ok@' end ||
muid || '@' || email ),
count( distinct case when proc_error_cd = '000' then
null else 'err@' end || muid || '@' || email )
into v_in_cnt, v_in_cnt_err
from cb.T co, cbf.calc_batch_dt_range rn
where 1=1
and check_dt_msk between v_check_dt_min and
v_check_dt_max
and cashback <> 0
and co.calc_batch_id = rn.calc_batch_id
and batch_group_id = v_tsid
and muid in ( select unnest ( v_muid_ar ) );

cb.T is a view of a few mln rows

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2020-02-11 19:23:59 Re: BUG #16254: SQL raises error dsa_allocate could not find 4 free pages
Previous Message Arseny Sher 2020-02-11 12:06:02 Re: ERROR: subtransaction logged without previous top-level txn record