Re: Binary support for pgoutput plugin - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Binary support for pgoutput plugin
Date
Msg-id 20191111165559.GA18684@alvherre.pgsql
Whole thread Raw
In response to Re: Binary support for pgoutput plugin  (Dave Cramer <davecramer@gmail.com>)
Responses Re: Binary support for pgoutput plugin  (Dave Cramer <davecramer@gmail.com>)
List pgsql-hackers
On 2019-Nov-11, Dave Cramer wrote:

> Previously someone mentioned that we need to confirm whether the two
> servers are compatible for binary or not.
> 
> Checking to make sure the two servers have the same endianness is obvious.
> Sizeof int, long, float, double, timestamp (float/int) at a minimum.
> 
> this could be done in libpqrcv_startstreaming. The question I have
> remaining is do we fall back to text mode if needed or simply fail ?

I think it makes more sense to have it fail.  If the user wants to retry
in text mode, they can do that easily enough; but if we make it
fall-back automatically and they set up the received wrongly by mistake,
they would pay the performance penalty without noticing.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Coding in WalSndWaitForWal
Next
From: Dave Cramer
Date:
Subject: Re: Binary support for pgoutput plugin