pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Verite <daniel@manitou-mail.org>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: vaishnaviprabakaran@gmail.com
Cc: michael.paquier@gmail.com
Cc: daniel@yesql.se
Cc: craig@2ndquadrant.com
Cc: andres@anarazel.de
Cc: david@pgmasters.net
Cc: VaishnaviP@fast.au.fujitsu.com
Cc: kommi.haribabu@gmail.com
Cc: tsunakawa.takay@jp.fujitsu.com
Cc: dmitigr@gmail.com
Cc: pgsql-hackers@postgresql.org
Cc: m.kniep@web.de
Cc: fujita.etsuro@lab.ntt.co.jp
Cc: iwata.aya@jp.fujitsu.com
Subject: Re: [HACKERS] PATCH: Batch/pipelining support for libpq
Date: Fri, 23 Mar 2018 14:18:09 +0100
Message-ID: <fa497dfa-348a-4fc7-89a2-e00e56544231@manitou-mail.org> (raw)
In-Reply-To: <20180322.211148.187821341.horiguchi.kyotaro@lab.ntt.co.jp>

	Kyotaro HORIGUCHI wrote:

> A disucssion on psql batch mode was held in another branch of
> this thread. How do we treat that?

There's a batch mode for pgbench in a patch posted in [1],
with \beginbatch and \endbatch commands, but nothing
for psql AFAICS.
psql is more complicated because currently it uses a 
blocking PQexec() call at its core. Craig mentioned psql
integration in [2] and [3].
Also a script can have inter-query dependencies such as in
   insert into table(...) returning id \gset
   update othertable set col= :id where ...;
which is a problem in batch mode, as we don't want
to send the update before the right value for :id is
known. Whether we want to support these dependencies
and how needs discussion.
For instance we might not support them at all, or
create a synchronization command that collects
all results of queries sent so far, or do it implicitly
when a variable is injected into a query...
This looks like substantial work that might be best
done separately from the libpq patch.

[1]
https://www.postgresql.org/message-id/b4e34135-2bd9-4b8a-94ca-27d760da26d7@manitou-mail.org
[2]
https://www.postgresql.org/message-id/CAMsr+YGLhaDkjymLuNVQy4MrSKQoA=F1vO=aN8XQf30N=aQuVA@mail.gmail...
[3]
https://www.postgresql.org/message-id/CAMsr+YE6BK4iAaQz=nY3xDnbLhnNZ_4tp-PTJqbNNpsZMgoo8Q@mail.gmail...


Best regards,
-- 
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite




view thread (182+ messages)  latest in thread

Message-ID: <fa497dfa-348a-4fc7-89a2-e00e56544231@manitou-mail.org>
Permalink:  ../fa497dfa-348a-4fc7-89a2-e00e56544231@manitou-mail.org/
Also on:    postgresql.org/message-id/fa497dfa-348a-4fc7-89a2-e00e56544231@manitou-mail.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: daniel@manitou-mail.org, horiguchi.kyotaro@lab.ntt.co.jp, vaishnaviprabakaran@gmail.com, michael.paquier@gmail.com, daniel@yesql.se, craig@2ndquadrant.com, andres@anarazel.de, david@pgmasters.net, VaishnaviP@fast.au.fujitsu.com, kommi.haribabu@gmail.com, tsunakawa.takay@jp.fujitsu.com, dmitigr@gmail.com, m.kniep@web.de, fujita.etsuro@lab.ntt.co.jp, iwata.aya@jp.fujitsu.com
  Subject: Re: [HACKERS] PATCH: Batch/pipelining support for libpq
  In-Reply-To: <fa497dfa-348a-4fc7-89a2-e00e56544231@manitou-mail.org>

* 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