Re: Why is pq_begintypsend so slow?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jack Christensen <jack(at)jncsoftware(dot)com>, David Fetter <david(at)fetter(dot)org>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why is pq_begintypsend so slow?
Date: 2020-06-09 21:06:25
Message-ID: CA+TgmobAKaASxcn6ccXS++27QkwWRN2g0U+VgJzeVV5Ug9cZ-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 9, 2020 at 3:23 PM Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2020-06-09 21:50:07 Re: Speedup usages of pg_*toa() functions
Previous Message Robert Haas 2020-06-09 21:04:42 Re: global barrier & atomics in signal handlers (Re: Atomic operations within spinlocks)