Postgres allows the use of any existing database on the server as a template when creating a new database.
CREATE DATABASE new_db WITH TEMPLATE original_db OWNER postgres;
Still, you may get:
ERROR: source database "original_db" is being accessed by other users
To disconnect all other users from the database, you can use this query:
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'original_db' AND pid <> pg_backend_pid();