pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Dave Cramer <pg@fastcrypt.com>
To: Alexandor84 <oleksandr.sukhotskyi@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Set readonly transaction per transaction
Date: Tue, 9 Dec 2014 19:40:09 +0000 (UTC)
Message-ID: <2006725267.4564708.1418154009521.JavaMail.yahoo@jws10084.mail.ne1.yahoo.com> (raw)
In-Reply-To: <CADK3HH+MdKd8X861XG=cV-=ytm=d4cwjw70LH2TLv7V9x4X=cA@mail.gmail.com>
References: <CADK3HH+MdKd8X861XG=cV-=ytm=d4cwjw70LH2TLv7V9x4X=cA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Dave Cramer <pg@fastcrypt.com> wrote:
> On 8 December 2014 at 03:17, Alexandor84 <oleksandr.sukhotskyi@gmail.com> wrote:

>> No one faced with such problem?

> Apparently not. I doubt many people use pgbouncer in transaction 
> mode.
>
> Can you explain why you are using transaction mode ?

Hey, now!  I often recommend transaction mode, because I have seen 
applications scale to a much higher concurrency that way.  See:

https://wiki.postgresql.org/wiki/Number_Of_Database_Connections

and:

http://stackoverflow.com/questions/10419665/how-does-pgbouncer-help-to-speed-up-django/10420469#1042...

As a suggestion to the original poster, how about executing:

SET read_only = on;

... as the first statement of a new transaction?

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (8+ messages)  latest in thread

Message-ID: <2006725267.4564708.1418154009521.JavaMail.yahoo@jws10084.mail.ne1.yahoo.com>
Permalink:  ../2006725267.4564708.1418154009521.JavaMail.yahoo@jws10084.mail.ne1.yahoo.com/
Also on:    postgresql.org/message-id/2006725267.4564708.1418154009521.JavaMail.yahoo@jws10084.mail.ne1.yahoo.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-jdbc@postgresql.org
  Cc: kgrittn@ymail.com, pg@fastcrypt.com, oleksandr.sukhotskyi@gmail.com
  Subject: Re: Set readonly transaction per transaction
  In-Reply-To: <2006725267.4564708.1418154009521.JavaMail.yahoo@jws10084.mail.ne1.yahoo.com>
  References: <CADK3HH+MdKd8X861XG=cV-=ytm=d4cwjw70LH2TLv7V9x4X=cA@mail.gmail.com> <2006725267.4564708.1418154009521.JavaMail.yahoo@jws10084.mail.ne1.yahoo.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