Re: Why is pq_begintypsend so slow? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Why is pq_begintypsend so slow?
Date
Msg-id CA+TgmobAKaASxcn6ccXS++27QkwWRN2g0U+VgJzeVV5Ug9cZ-g@mail.gmail.com
Whole thread Raw
In response to Re: Why is pq_begintypsend so slow?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Tue, Jun 9, 2020 at 3:23 PM Andres Freund <andres@anarazel.de> wrote:
> ISTM that it'd be pretty broken if it could happen. We cannot have two
> different parts of the system send messages to the client
> independently. The protocol is pretty stateful...

There's a difference between building messages concurrently and
sending them concurrently.

> Set a boolean and assert out if one already is in progress? We'd need
> some state to know where to reset the position to on error anyway.

Sure, that's basically just different notation for the same thing. I
might prefer my notation over yours, but you might prefer the reverse.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: global barrier & atomics in signal handlers (Re: Atomicoperations within spinlocks)
Next
From: Ranier Vilela
Date:
Subject: Re: Speedup usages of pg_*toa() functions