Writable Foreign Tables (with transactions!!!)

One of the great features coming in PostgreSQL 9.3 is writable foreign tables. Before 9.3, foreign tables were strictly read-only, which is still very cool, but it really just made PostgreSQL a tool for query federation. Starting in 9.3, you can now execute inserts, updates and deletes in addition to selects, if the foreign data wrapper supports it. Also in 9.3 is a new contrib module implementing a long awaited PostgreSQL FDW which does fully support remote writes was added. While playing around with it a bit, I realized that now only does it support remote writes, it also supports transactions as well.

I tried the following little test fully expecting that the insert into the foreign table would be committed, but was pleasantly surprised that it wasn’t.

test=# \det
 List of foreign tables
 Schema | Table | Server 
--------+------------------+-------------
 public | pgbench_accounts | pg_server
 public | pgbench_branches | pg_server
 public | pgbench_tellers | pg_server
(3 rows)
test=# select * from pgbench_branches ;
 bid | bbalance | filler 
-----+----------+--------
 1 | 0 | 
(1 row)
test=# BEGIN;
BEGIN
test=# INSERT INTO pgbench_branches VALUES (2, 0, 'filler');
INSERT 0 1
test=# ROLLBACK;
ROLLBACK
test=# select * from pgbench_branches ;
 bid | bbalance | filler 
-----+----------+--------
 1 | 0 | 
(1 row)

How cool is that? The FDW starts a remote transaction and then honors the rollback. That just took the new PostgreSQL FDW from a interesting tool to a truly great new feature.

 

  1. generic_viagrageneric_viagra05-22-2014

    Hello!

  2. cheap_cialischeap_cialis06-22-2014

    Hello!

  3. viagra_onlineviagra_online06-26-2014

    Hello!

  4. cialiscialis06-27-2014

    Hello!

  5. genericgeneric07-16-2014

    Hello!

  6. viagraviagra07-16-2014

    Hello!

  7. fastfast07-22-2014

    Hello!

  1. Writable Foreign Tables (with transactions!!!) ...08-12-13
  2. Branson Missouri Private Investigator09-18-13
  3. http://ubergamez.com09-19-13
  4. http://www.ecotechnologia.net09-19-13
  5. openlrm.com09-19-13
  6. generalestate09-20-13
  7. what is the best wrinkle cream09-21-13
  8. free food vouchers09-21-13
  9. herbal treatment for herpes09-21-13
  10. hemoroizi tratament09-21-13
  11. free e cig09-21-13
  12. justin timberlake antes y despues09-22-13
  13. http://safari4us.com09-22-13
  14. lavorare da casa09-22-13
  15. outlast free download09-22-13
  16. sgpools lobang09-23-13
  17. home page09-23-13
  18. Search Rex Craigslist Search Engine09-23-13
  19. seo services09-23-13
  20. Craigslist Search Engine09-24-13
  21. Electrician Durham09-24-13
  22. Charleston South Carolina09-24-13
  23. more information09-24-13
  24. fat burner09-24-13
  25. Camfrog Room09-24-13
  26. read article09-24-13
  27. money online news09-25-13
  28. V2 cigs starter kits09-25-13
  29. read review09-25-13
  30. how to open a business09-25-13
  31. Carpet Pet Urine Removal09-25-13
  32. pillarapps.com09-25-13
  33. real work from home jobs09-26-13
  34. lavorare da casa09-26-13
  35. moving companies marietta ga09-26-13
  36. tree services atlanta ga09-26-13
  37. water damage atlanta ga09-27-13
  38. Cigarette electronique09-27-13
  39. cardiologist in los angeles ca09-27-13
  40. raspberry ketone scam09-27-13
  41. giochi casino gratis09-27-13
  42. green coffee beans09-27-13
  43. top cardiologists in los angeles area09-27-13
  44. raspberry ketone09-27-13
  45. book of ra online casino paypal09-28-13
  46. football fantasy09-28-13
  47. hcg diet09-28-13
  48. free e cig sample09-28-13
  49. garcinia cambogia extract dosage09-28-13
  50. garcinia cambogia extract09-28-13
  51. free electric cigarettes starter kit09-29-13
  52. water ionizer scam09-29-13
  53. twitter.com/NHCPS09-29-13
  54. water ionizer scam09-30-13
  55. casino ohne einzahlung forum09-30-13
  56. tabela fipe carros fgv09-30-13
  57. charlize theron hot09-30-13
  58. inscrição no bbb 201410-02-13
  59. click here10-02-13
  60. create android apps10-03-13
  61. Blog Beast10-06-13
  62. try this10-06-13
  63. this content10-07-13
  64. facebook advertising software for mac10-08-13
  65. http://blu-cigs.net/10-08-13
  66. slot gratis 3D10-08-13
  67. meratol10-09-13
  68. rencontres gratuit10-10-13
  69. how to last longer in bed10-12-13
  70. wellbabysite.com10-13-13
  71. e cigs10-14-13
  72. biznesso10-15-13

Leave a Reply

Please type the characters of this captcha image in the input box

Please write the answer to the math question of this captcha image in the input box

/* ]]> */