Masaru Sugawara wrote:
Hi, all

While trying dblink_exec(), one of dblink()'s functions, I noticed there was an
odd situation: case 1 and case 2 worked well, but case 3 didn't(see below). I hadn't been aware of it so that I only executed BEGIN and END in
dblink_exec() at first . This time, however, I noticed it by executing ROLLBACK.

I'm hoping that dblink_exec() returns something like warning if those who intend
to do transactions make a declaration of blink_exec('dbname=some', 'begin') by mistake.

for example WARNING :You should declare dblink_exec('dbname=some', 'BEGIN; some queries;
around dblink_exec('some queries')s. If not, your transactions won't work.
How can dblink() possibly be used safely for non-readonly transactions without a full implementation of a two-phase commit protocol? What happens when the remote server issues the COMMIT and then the local server crashes?

Mike Mascari

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to