Re: Protocol buffer support for Postgres

From: Flavius Anton <f(dot)v(dot)anton(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Protocol buffer support for Postgres
Date: 2016-06-23 19:15:16
Message-ID: CANXdjjb8m_33yYpg7+q3xsoLw_DMzoRaYMjTCevS2rNU4L4xFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 26, 2016 at 2:40:49PM -0700, David Fetter wrote:
> Should we see about making a more flexible serialization
> infrastructure? What we have is mostly /ad hoc/, and has already
> caused real pain to the PostGIS folks, this even after some pretty
> significant and successful efforts were made in this direction.

Hi all. Is anybody working on this right now? I would like to pick
this task for the summer. First of all, what do you think about what
David said? Should we try and design a generic infrastructure for
similar serialization datatypes? If so, will we need to refactor some
pieces from the JSON/XML implementation? I looked over the code and it
seems nicely decoupled, but I am not sure what this would involve.
I've done this before for MySQL[1] (not yet completed), but I'd love
to try it for PostgreSQL too.

On Tue, Apr 26, 2016 at 11:23:11AM -0700, José Luis Tallón wrote:
> Have you investigated JSONB vs ProtoBuf space usage ?
> (the key being the "B" -- Postgres' own binary JSON
> implementation)

This is something I can further investigate, but another (possibly
major) benefit of the Protocol Buffers over JSON is that they *still*
have a schema. I think they combine advantages from both structured
and schemaless data.

My best guess is that we shouldn't focus on abstracting *any*
serialization paradigm, but only the ones that have a schema (like
Thrift or Protocol Buffers). Speaking of schemas, where is the best
place to keep that? For MySQL I opted for a plain text file similar to
.trg files (the ones used by MySQL for keeping triggers).

I'd love to talk more about this.

Thank you.
Flavius Anton

[1] https://github.com/google/mysql-protobuf

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2016-06-23 20:50:31 Re: Protocol buffer support for Postgres
Previous Message David G. Johnston 2016-06-23 18:56:22 Re: Bug in to_timestamp().