sunitparekh / data-anonymization

Want to use production data for testing, data-anonymization can help you.
MIT License
459 stars 92 forks source link

closing connections #39

Closed neshantksharma closed 8 years ago

neshantksharma commented 8 years ago

In our weekly obfuscation process we have more than 432 tables but total number of connections allocated were 256 for the postgres. This caused the script to fail after 256 connections expired and stopped the obfuscation process because connections were not closed as evident from pg_stat_activity table.

Solutions : 1) Initially to overcome this problem we split the ruby script into two parts with equal number of tables and avoided the problem . Cons: But requires us to manage to ruby scripts for white listing whenever requirement changes.

2) Closing connections after anonymization on table, to solve the problem if there are more tables than number of connections in the ruby script. This is the proposed solution in this pull request.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.06%) to 95.041% when pulling d9e247552d474ee6fd2f8d3fbe48b2950162ddfe on Vanare:close_connections into aba2d5920401d9c62d37ae4b1909f2625f4bdb48 on sunitparekh:master.