TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Fork a distributed Postgres database with Citus

58 pointsby DataChompalmost 8 years ago

3 comments

_Codemonkeyismalmost 8 years ago
&quot;staging environment to experiment with, that is an exact copy of your production database?&quot;<p>This seems to be problematic in several compliance schemes. Most will make sure developers,QA etc. do not get access to production data.
评论 #14976523 未加载
ing33kalmost 8 years ago
it&#x27;s a very useful feature to have.<p>if you use Heroku Postgres Database ( production tier ), they have a fork feature as well.<p>if you are running Postgres on your own and for relatively small loads, it&#x27;s quite trivial to create a copy of the db using Template<p><pre><code> CREATE DATABASE new_db TEMPLATE = old_db; </code></pre> <a href="https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;9.2&#x2F;static&#x2F;manage-ag-templatedbs.html" rel="nofollow">https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;9.2&#x2F;static&#x2F;manage-ag-templat...</a><p>While not the responsibility of a DB vendor, it would be nice if this includes some Data anonymization&#x2F;randomization option.
评论 #14977212 未加载
yangyangalmost 8 years ago
We use ZFS (on Linux) clones to instantly fork a read-only replica of our production database, to create r&#x2F;w copies. We also currently have these upgraded in-place to 9.6 (we&#x27;re still on 9.5) for testing.<p>Docker-compose and a makefile make it all very straightforward.