From: huangning290@yahoo.com <huangning290@yahoo.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Parallel not working
Date: Tue, 17 May 2022 12:24:18 +0000 (UTC)
Message-ID: <1423035518.180233.1652790258244@mail.yahoo.com> (raw)
References: <1423035518.180233.1652790258244.ref@mail.yahoo.com>
Hi:
I write a C function, the function is as follows:
create function st_geosotgrid(geom geometry, level integer) returns geosotgrid[]
immutable
strict
parallel safe
language c
as
$$
begin
-- missing source code
end;
$$;
At the same time, I set the relevant parameters:
force_parallel_mode: offmax_parallel_maintenance_workers: 4max_parallel_workers: 8max_parallel_workers_per_gather: 2max_worker_processes: 8min_parallel_index_scan_size: 64min_parallel_table_scan_size: 1024parallel_leader_participation: on
set parallel_setup_cost = 10;set parallel_tuple_cost = 0.001;
sql:
select st_geosotgrid(geom,20) from t_polygon_gis;
and the explain as follows:
Gather (cost=10.00..5098.67 rows=200000 width=32) Workers Planned: 2 -> Parallel Seq Scan on t_polygon_gis (cost=0.00..4888.67 rows=83333 width=32)
when i explain analyze ,the parallel worker is suspend:
I would like to know how can I get it to work properly?
Thank You!
Attachments:1652790248334blob.jpg (image/png, 21.6K) downloadview image
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: huangning290@yahoo.com
Subject: Re: Parallel not working
In-Reply-To: <1423035518.180233.1652790258244@mail.yahoo.com>
References: <1423035518.180233.1652790258244.ref@mail.yahoo.com> <1423035518.180233.1652790258244@mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox