citusdata / pg_shard

ATTENTION: pg_shard is superseded by Citus, its more powerful replacement
https://github.com/citusdata/citus
GNU Lesser General Public License v3.0
1.06k stars 63 forks source link

Add ON COMMIT behavior to multi-shard temp. tables #39

Closed jasonmp85 closed 9 years ago

jasonmp85 commented 9 years ago

Data for multi-shard queries is pulled to the master node for final computation before the query returns. Temporary tables used to store this data should not persist past the end of the multi-shard queries; instead, they were persisting until the end of the session. This change gives these temporary tables ON COMMIT DROP behavior, which ensures they are destroyed as soon as the current query commits.

Fixes #32.

jasonmp85 commented 9 years ago

Assigned to @sumedhpathak for code review.

sumedhpathak commented 9 years ago

Looks good. If you have verified the test fails without the fix, you are good to :shipit:

jasonmp85 commented 9 years ago

Just verified that the test finds two temp tables (and fails) in a branch without the fix. Merging.