From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: josh@agliodbs.com
Cc: pdarley@kinesis-cem.com
Cc: darcy@wavefire.com
Cc: jd@www.commandprompt.com
Cc: sfrost@snowman.net
Cc: herve@elma.fr
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL clustering VS MySQL clustering
Date: Sat, 22 Jan 2005 12:39:28 +0900 (JST)
Message-ID: <20050122.123928.71087515.t-ishii@sra.co.jp> (raw)
In-Reply-To: <200501211634.39560.josh@agliodbs.com>
References: <PDEOIIFFBIAABMGNJAGPMEOODLAA.pdarley@kinesis-cem.com>
<200501211634.39560.josh@agliodbs.com>
> Peter, Tatsuo:
>
> would happen with SELECT queries that, through a function or some
> > other mechanism, updates data in the database? Would those need to be
> > passed to pgpool in some special way?
>
> Oh, yes, that reminds me. It would be helpful if pgPool accepted a control
> string ... perhaps one in a SQL comment ... which indicated that the
> statement to follow was, despite appearances, an update. For example:
> --STATEMENT_IS_UPDATE\n
Actually the way judging if it's a "pure" SELECT or not in pgpool is
very simple. pgpool just checkes if the SQL statement exactly begins
with "SELECT" (case insensitive, of course). So, for example, you
could insert an SQL comment something like "/*this SELECT has side
effect*/ at the beginning of line to indicate that pgpool should not
send this query to the slave.
> The alternative is, of course, that pgPool direct all explicit transactions to
> the master ... which is a good idea anyway. So you could do:
>
> BEGIN;
> SELECT some_update_function();
> COMMIT;
Yes. pgpool has already done this in load balancing. Expanding this
for Slony-I is pretty easy.
--
Tatsuo Ishii
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-performance@postgresql.org
Cc: t-ishii@sra.co.jp, josh@agliodbs.com, pdarley@kinesis-cem.com, darcy@wavefire.com, jd@www.commandprompt.com, sfrost@snowman.net, herve@elma.fr
Subject: Re: PostgreSQL clustering VS MySQL clustering
In-Reply-To: <20050122.123928.71087515.t-ishii@sra.co.jp>
References: <PDEOIIFFBIAABMGNJAGPMEOODLAA.pdarley@kinesis-cem.com> <200501211634.39560.josh@agliodbs.com> <20050122.123928.71087515.t-ishii@sra.co.jp>
* 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