DbSchema is a powerful database management and design tool for PostgreSQL. It offers features such as visual schema design, team collaboration with GIT, schema deployment and HTML schema documentation.
Choose "Connect to the database" or "New Model Connected to the Database" will let you select your database and open the Connection Dialog.
DbSchema automatically downloads the JDBC driver to connect to your database.
In the Connection Dialog window, select the JDBC URL you want to connect with. If your database is running in the cloud, choose Edit Manually and insert the JDBC URL from the cloud console.
Enter the host name, the authentication details, select your database as described in the Connection Dialog page.
If the database is running in the cloud (AWS, Azure, Google, etc. ) choose 'Manually Edit JDBC URL' and copy the JDBC URL from the cloud console.
You can connect to Postgres using the user 'postgres'. The default port is 5432. If you connect from a remote computer you have to enable the access from remote computers.
Check the following if you cannot connect to the database:
On Postgres server there is a file called pg_hba.conf. On Windows it is located in the installation folder /data, on linux in /var/lib/pgsql/data/. Edit the pg_hba.conf file and append the following configuration line, replacing 10.10.29.0 with your client machine IP :
host all all 10.10.29.0/24 trustMore simple, you can allow all hosts to connect by adding this line:
host all all 0.0.0.0/0 md5
Then restart the server. For this you may use the command below (replace the path to data folder).
pg_ctl.exe -D <path_to_data_folder> restart
To enable listening for all hosts, edit the file postgresql.conf ( on Windows located in Postgres installation folder /data, on linux in /var/lib/pgsql/data/ ), find configuration line that read as follows: listen_addresses='localhost'. Change it to listen_addresses='*' Eventually you can change this to your IP address. For example listen_addresses='202.54.1.3'
Search on google for 'postgresql enable remote access' to find further documentation.
ALTER USER <someUser> PASSWORD '<newPassword>';
openssl x509 -outform der -in <mypemcertificate>.pem -out <newdercert>.der keytool -import -alias <anyname> -keystore <newcertfilename> -file <newdercert>.der # Keytool may ask for a password to generate the newcert. The new certificate will be available in c:\backupEdit the DbSchema.vmoptions (located in the same folder as DbSchema.exe or ./DbSchema.app/Contents/vmoptions.txt on Mac OS) and add this parameters:
-Djavax.net.ssl.trustStore=<Full Path of the newcertfilename that you generated> -Djavax.net.ssl.trustStorePassword=<The password you provided to create the netcertfilename> -Djavax.net.debug=sslIn the connection dialog choose 'Use SSL':
Start the setup...
Choose the Data Directory:
Choose your password:
Select the port number or leave it default (5432):
# Use the official PostgreSQL image from the Docker Hub
FROM postgres:latest
# Install dependencies for building the system_stats extension
RUN apt-get update && \
apt-get install -y build-essential postgresql-server-dev-all
# Update the package list and install git
RUN apt-get update && apt-get install -y git
# Clone the system_stats repository
RUN git clone https://github.com/EnterpriseDB/system_stats /usr/src/system_stats
# Build and install the system_stats extension
RUN cd /usr/src/system_stats && \
make && \
make install
# Clean up
RUN apt-get remove -y build-essential postgresql-server-dev-all && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /usr/src/system_stats
# Set the default command to run PostgreSQL
CMD ["postgres"]
From command prompt or terminal, go into this directory and execute:
docker build -t postgres-with-system-stats .
docker run --name postgres-with-system-stats -e POSTGRES_PASSWORD=xxx -p 5432:5432 -it postgres-with-system-stats
Connect with DbSchema to the docker container as user postgres using the password from the command above, port 5432.
Execute from DbSchema SQL Editor:
CREATE EXTENSION system_stats;