Re: pgsql_fdw, FDW for PostgreSQL server - Mailing list pgsql-hackers

From Albe Laurenz
Subject Re: pgsql_fdw, FDW for PostgreSQL server
Date
Msg-id D960CB61B694CF459DCFB4B0128514C20794FF42@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: pgsql_fdw, FDW for PostgreSQL server  (Shigeru Hanada <shigeru.hanada@gmail.com>)
Responses Re: pgsql_fdw, FDW for PostgreSQL server
List pgsql-hackers
Shigeru Hanada wrote:
[pgsql_fdw_v12.patch]

I know this is not the latest version, but I played around with it and
tickled a bug.
It seems to have a problem with rolled back subtransactions.

test=> \d+ remote                     Foreign table "laurenz.remote"   Column |  Type   | Modifiers | FDW Options |
Storage | Description  --------+---------+-----------+-------------+----------+-------------   id     | integer | not
null |             | plain    |   val    | text    | not null  |             | extended |  Server: loopback  FDW
Options:(nspname 'laurenz', relname 'local')  Has OIDs: no 
test=> BEGIN;
test=> DECLARE x CURSOR FOR SELECT * FROM remote;  DEBUG:  Remote SQL: SELECT id, val FROM laurenz.local  DEBUG:
relid=16423fetch_count=10000  DEBUG:  starting remote transaction with "START TRANSACTION ISOLATION 
LEVEL REPEATABLE READ"
test=> FETCH x;   id | val  ----+-----    1 | one  (1 row)
test=> SAVEPOINT z;
test=> ERROR OUT;  ERROR:  syntax error at or near "ERROR"  LINE 1: ERROR OUT;
test=> ROLLBACK TO SAVEPOINT z;
test=> FETCH x;   id | val  ----+-----    2 | two  (1 row)
test=> COMMIT;  ERROR:  could not close cursor  DETAIL:  no connection to the server
  HINT:  CLOSE pgsql_fdw_cursor_0

The error message reported is not consistent, at one attempt the backend
crashed.

Yours,
Laurenz Albe


pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: RFC: Making TRUNCATE more "MVCC-safe"
Next
From: Noah Misch
Date:
Subject: Re: RFC: Making TRUNCATE more "MVCC-safe"