BUG #17441: shm_mq receive less data than the sender sends - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17441: shm_mq receive less data than the sender sends
Date
Msg-id 17441-b67dc542f085e3ba@postgresql.org
Whole thread Raw
Responses Re: BUG #17441: shm_mq receive less data than the sender sends  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17441
Logged by:          ytf
Email address:      fft_665665@163.com
PostgreSQL version: 10.17
Operating system:   centos
Description:

Dears, 

I launch one dynamic worker as the sender, use shm_mq send data to the
SELECT, which I register a copy hook to receive data from sender.
Each data length is 800.

When I set shm_mq SIZE to 16, there is no problem. Only speed is very
slow.

However, when I set shm_mq Size to 8192 or larger, I meet a problem. 

I first receive 800 length data , and after a few times, I only receive 732
length data. 

I registered the shm_mq like following :
#define QUEUE_SIZE 8192
mq = shm_mq_create(shm_toc_allocate(pcxt->toc, QUEUE_SIZE), QUEUE_SIZE);
shm_toc_insert(pcxt->toc, COS_KEY_QUEUE, mq);
shm_mq_set_receiver(mq, MyProc);


pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: snapshot recovery conflict despite hot_standby_feedback set to on
Next
From: PG Bug reporting form
Date:
Subject: BUG #17442: Wrong partition pruning when using prepared statement and huge RAM consumption