Re: [HACKERS] Parallel Hash take II

Поиск
Список
Период
Сортировка
От Prabhat Sahu
Тема Re: [HACKERS] Parallel Hash take II
Дата
Msg-id CANEvxPqxVjuzdB4uXmwLaTJxVws8j8LGUfdFi_SL4VyEw1pLEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Parallel Hash take II  (Prabhat Sahu <prabhat.sahu@enterprisedb.com>)
Ответы Re: [HACKERS] Parallel Hash take II  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Hi Thomas,

Setting with lower "shared_buffers" and "work_mem" as below,  query getting crash but able to see explain plan.

shared_buffers = 1MB
work_mem = 1MB
max_parallel_workers_per_gather = 4
max_parallel_workers = 8
enable_mergejoin = off
enable_nestloop = off
enable_hashjoin = on
force_parallel_mode = on
seq_page_cost = 0.1
random_page_cost = 0.1
effective_cache_size = 128MB
parallel_tuple_cost = 0
parallel_setup_cost = 0
parallel_synchronization_cost = 0

CREATE TABLE t1 (a int, b text);
INSERT INTO t1 (SELECT x%20000, x%20000||'_b' FROM generate_series(1,200000) x);
ANALYZE;

postgres=# explain select * from t1, t1 t2 where t1.a = t2.a;
                                       QUERY PLAN                                        
-----------------------------------------------------------------------------------------
 Gather  (cost=2852.86..16362.74 rows=2069147 width=22)
   Workers Planned: 1
   ->  Parallel Hash Join  (cost=2852.86..16362.74 rows=1217145 width=22)
         Hash Cond: (t1.a = t2.a)
         ->  Parallel Seq Scan on t1  (cost=0.00..1284.57 rows=117647 width=11)
         ->  Parallel Hash  (cost=1284.57..1284.57 rows=117647 width=11)
               ->  Parallel Seq Scan on t1 t2  (cost=0.00..1284.57 rows=117647 width=11)
(7 rows)

postgres=# select * from t1, t1 t2 where t1.a = t2.a;
WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and repeat your command.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> 


-- After assigning more "shared_buffers(10MB)" and "work_mem(10MB)" query execute successfully.

Kindly check, if you can reproduce this at your end.

Thanks & Regards,

Prabhat Kumar Sahu
Mob: 7758988455
Skype ID: prabhat.sahu1984


On Wed, Sep 13, 2017 at 12:34 PM, Prabhat Sahu <prabhat.sahu@enterprisedb.com> wrote:

On Thu, Aug 31, 2017 at 6:23 PM, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
Here's a new rebased and debugged patch set.

Hi Thomas,

I have applied the recent patch (v19) and started testing on this feature and i got a crash with below testcase.

with default setting on "postgres.conf" file

create table tab1 (a int, b text);
create table tab2 (a int, b text);
insert into tab1 (select x, x||'_b' from generate_series(1,200000) x);
insert into tab2 (select x%20000, x%20000||'_b' from generate_series(1,200000) x);
ANALYZE;
select * from tab1 t1, tab2 t2, tab1 t3 where t1.a = t2.a and  t2.b = t3.b order by 1;

WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and repeat your command.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> 

Kindly check, if you can reproduce this at your end.


Thanks & Regards,

Prabhat Kumar Sahu
Mob: 7758988455
Skype ID: prabhat.sahu1984

 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: [HACKERS] Hooks to track changed pages for backup purposes