Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

copy entire Postgres database (its structure and data)

create db using sql prompt:
CREATE DATABASE newdb WITH TEMPLATE originaldb;
create db with sql prompt:
$ CREATEDB new_db_name -T orig_db_name -O db_user;
  • This requires originaldb to not be in use
  • you need to stop all services. and this work fine
  • This is probably implemented as CREATE DATABASE newdb WITH TEMPLATE originaldb OWNER dbuser; and as a result requires that the original database must be idle (no connections with write access) and any new connections to original database are prevented while the copying is in process. 

Comments

Popular posts from this blog

PostgreSQL pgBadger

PostgreSQL Pgbadger Installation On Linux

How to configure Replication Manager (repmgr) ?

What's is the difference between streaming replication Vs hot standby vs warm standby ?

PostgreSQL Sequence