pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17441: shm_mq receive less data than the sender sends
3+ messages / 3 participants
[nested] [flat]

* BUG #17441: shm_mq receive less data than the sender sends
@ 2022-03-20 08:39  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2022-03-20 08:39 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: fft_665665@163.com

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);



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #17441: shm_mq receive less data than the sender sends
@ 2022-03-23 02:59  Masahiko Sawada <sawada.mshk@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Masahiko Sawada @ 2022-03-23 02:59 UTC (permalink / raw)
  To: fft_665665@163.com; pgsql-bugs@lists.postgresql.org

On Sun, Mar 20, 2022 at 9:20 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
>
> 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);

Could you please provide the reproducible steps and codes for the
problem you're facing? That's very helpful to understand and
investigate the problem.

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #17441: shm_mq receive less data than the sender sends
@ 2022-03-23 04:41  Michael Paquier <michael@paquier.xyz>
  parent: Masahiko Sawada <sawada.mshk@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2022-03-23 04:41 UTC (permalink / raw)
  To: Masahiko Sawada <sawada.mshk@gmail.com>; +Cc: fft_665665@163.com; pgsql-bugs@lists.postgresql.org

On Wed, Mar 23, 2022 at 11:59:06AM +0900, Masahiko Sawada wrote:
> On Sun, Mar 20, 2022 at 9:20 PM PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> 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.
>
> Could you please provide the reproducible steps and codes for the
> problem you're facing? That's very helpful to understand and
> investigate the problem.

Yeah, I'd like to see that with a test that reproduces with core PG.
Now, perhaps this is some custom extension code?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-03-23 04:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20 08:39 BUG #17441: shm_mq receive less data than the sender sends PG Bug reporting form <noreply@postgresql.org>
2022-03-23 02:59 ` Masahiko Sawada <sawada.mshk@gmail.com>
2022-03-23 04:41   ` Michael Paquier <michael@paquier.xyz>

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