Re: WIP Patch: Add a function that returns binary JSONB as a bytea

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, kevinvan(at)shift(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP Patch: Add a function that returns binary JSONB as a bytea
Date: 2018-11-02 16:15:47
Message-ID: 20181102161547.GR4184@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Merlin Moncure (mmoncure(at)gmail(dot)com) wrote:
> On Fri, Nov 2, 2018 at 10:53 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Andres' point about alignment is a pretty good one as well, if it applies
> > here --- I don't recall just what internal alignment requirements jsonb
> > has. We have not historically expected clients to have to deal with that.
>
> I see your (and Andres') point; the binary wire format ought to lay on
> top of the basic contracts established by other types. It can be
> binary; just not a straight memcpy out of the server. The array and
> composite type serializers should give some inspiration there on
> serialization.

Right- I agree w/ Tom and Andres on this part also.

> I'll still stand other point I made though; I'd
> really want to see some benchmarks demonstrating benefit over
> competing approaches that work over the current formats. That should
> frame the argument as to whether this is a good idea.

What are the 'competing approaches' you're alluding to here? Sending
text-format json across as we do today? Is there something else you're
thinking would be appropriate in this kind of a performance bake-off...?
I'm having a hard time seeing what else would actually have the
flexibility that JSON does without being clearly worse (xml?).

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2018-11-02 17:20:58 Re: WIP: Avoid creation of the free space map for small tables
Previous Message Alvaro Herrera 2018-11-02 16:15:32 Re: partitioned indexes and tablespaces