[Pgpool-general] select in transactions

Yoshiyuki Asaba y-asaba at sraoss.co.jp
Thu Sep 27 08:25:52 UTC 2007


Hi,

From: "Christopher Gorge Marges" <christophergorge at gmail.com>
Subject: [Pgpool-general] select in transactions
Date: Thu, 27 Sep 2007 12:47:00 +0800

> In pgpool-II a select inside a transaction does not see the inserted rows.
> 
> (example from pgpool-II doc)
> 
> BEGIN;
> INSERT INTO t(a) VALUES (1);
> SELECT * FROM t ORDER BY a; <-- INSERT above is not visible from this SELECT
> statement
> END;
> 
> If the behavior is the same in pgpool then I'm afraid the transations we
> have wont work anymore.

The behavior is only parallel query mode in pgpool-II.

pgpool works correctly. Also, pgpool-II works correctly if
you set parallel_mode to false in pgpool.conf.

  % psql -p 9999 pgpool
  pgpool=# CREATE TABLE tbl (a INT);
  CREATE TABLE
  pgpool=# BEGIN;
  BEGIN
  pgpool=# INSERT INTO tbl VALUES (1);
  INSERT 0 1
  pgpool=# SELECT * FROM tbl;
   a
  ---
   1
  (1 row)

  pgpool=# COMMIT;
  COMMIT

Regards,
--
Yoshiyuki Asaba
y-asaba at sraoss.co.jp


More information about the Pgpool-general mailing list