pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Nicolas Paris <niparisco@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org
Subject: Re: New Copy Formats - avro/orc/parquet
Date: Sat, 10 Feb 2018 18:21:37 +0100
Message-ID: <3274b427-fe3a-89fc-2302-52082bf817aa@2ndquadrant.com> (raw)
In-Reply-To: <20180210153011.o2w3tdriqmwvahph@gmail.com>
References: <20180210151304.fonjztsynewldfba@gmail.com>
	<78a8f0bd-4b6f-b791-b6ce-80b19e2b6d1b@aklaver.com>
	<20180210153011.o2w3tdriqmwvahph@gmail.com>



On 02/10/2018 04:30 PM, Nicolas Paris wrote:
>>> I d'found useful to be able to import/export from postgres to those modern data
>>> formats:
>>> - avro (c writer=https://avro.apache.org/docs/1.8.2/api/c/index.html)
>>> - parquet (c++ writer=https://github.com/apache/parquet-cpp)
>>> - orc (all writers=https://github.com/apache/orc)
>>>
>>> Something like :
>>> COPY table TO STDOUT ORC;
>>>
>>> Would be lovely.
>>>
>>> This would greatly enhance how postgres integrates in big-data ecosystem.
>>>
>>> Any thought ?
>>
>> https://www.postgresql.org/docs/10/static/sql-copy.html
>>
>> "PROGRAM
>>
>>     A command to execute. In COPY FROM, the input is read from standard
>> output of the command, and in COPY TO, the output is written to the standard
>> input of the command.
>>
>>     Note that the command is invoked by the shell, so if you need to pass
>> any arguments to shell command that come from an untrusted source, you must
>> be careful to strip or escape any special characters that might have a
>> special meaning for the shell. For security reasons, it is best to use a
>> fixed command string, or at least avoid passing any user input in it.
>> "
>>
> 
> PROGRAM would involve overhead of transforming data from CSV or
> BINARY to AVRO for example.
> 
> Here, I am talking about native format exports/imports for
> performance considerations.
> 

That is true, but the question is how significant the overhead is. If
it's 50% then reducing it would make perfect sense. If it's 1% then no
one if going to be bothered by it.

Without these numbers it's hard to make any judgments.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (20+ messages)  latest in thread

Message-ID: <3274b427-fe3a-89fc-2302-52082bf817aa@2ndquadrant.com>
Permalink:  ../3274b427-fe3a-89fc-2302-52082bf817aa@2ndquadrant.com/
Also on:    postgresql.org/message-id/3274b427-fe3a-89fc-2302-52082bf817aa@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, niparisco@gmail.com, adrian.klaver@aklaver.com
  Subject: Re: New Copy Formats - avro/orc/parquet
  In-Reply-To: <3274b427-fe3a-89fc-2302-52082bf817aa@2ndquadrant.com>
  References: <20180210151304.fonjztsynewldfba@gmail.com> <78a8f0bd-4b6f-b791-b6ce-80b19e2b6d1b@aklaver.com> <20180210153011.o2w3tdriqmwvahph@gmail.com> <3274b427-fe3a-89fc-2302-52082bf817aa@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox