Re: Flushing large data immediately in pqcomm

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Flushing large data immediately in pqcomm
Date: 2024-03-20 21:57:34
Message-ID: CAApHDvoZe_r6E_FDk4rsF9MBEV4tX2tpMXwZMzDvPX5_QnQStg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 15 Mar 2024 at 01:46, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> - the "(int *) &len)" cast is not ok, and will break visibly on
> big-endian systems where sizeof(int) != sizeof(size_t).

I think fixing this requires adjusting the signature of
internal_flush_buffer() to use size_t instead of int. That also
means that PqSendStart and PqSendPointer must also become size_t, or
internal_flush() must add local size_t variables to pass to
internal_flush_buffer and assign these back again to the global after
the call. Upgrading the globals might be the cleaner option.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-03-20 22:00:08 Re: Trying to build x86 version on windows using meson
Previous Message David Rowley 2024-03-20 21:54:22 Re: Flushing large data immediately in pqcomm