title: How to check if directory is valid Postgres database
body: <p>I spinup postgres container and its data path <code>/var/lib/postgresql/data</code> is mapped to my local using volumes. As soon as container is up and database is setup the local path populates with all db data. I need to some how check programatically (using Python) if local location is proper postgres db data. This is needed if I need to create tables or not. I create if local directory is blank or invalid postgres data and I don't if it is valid. The reason I am trying to achieve this is if I want to hook up local db created due to <code>postgers_container_1</code> to <code>postgres_container_2</code> </p>