Categories
PostgreSQL Spring

PostgreSQL integration tests using Testcontainers

Running tests against a real database provides more confidence in comparison to an in-memory database such as H2. For that, the Testcontainers library is a wise choice as it provides an out-of-the-box solution to write and run integration tests against an actual database of your choice running in a Docker container. In this tutorial, we […]

Categories
PostgreSQL

How to increase max connection size of PostgreSQL in Ubuntu

If you are accessing to PostgreSQL database using programming language, sometimes, you may get exception such as fatal sorry too many clients already or more precisely the following exception in Java. org.postgresql.util.psqlexception fatal sorry too many clients already The reason for such an error is due to the fact that your program perhaps made too […]

Categories
PostgreSQL

PostgreSQL useful features

Previously I wrote some posts about PostgreSQL such as basic commands, trigger, replications, etc. In this post I will go one more level more and start playing with config files, logs and other stuff. The first thing that I would like to demonstrate is PostgreSQL log file. Basically live PostgreSQL log file is a very […]

Categories
PostgreSQL

Database trigger in PostgreSQL

Triggers in DB provides a facility to set triggers on certain tables for performing events (insert, delete, update) in another table. For instance, I want if any entry added to table A, consequentially a new row will be added to table B with some information that comes from table A. This process also is applicable […]

Categories
PostgreSQL

Basic postgreSQL commands

PostgreSQL (AKA postgres) is the one of the well-known relational database. It is pretty capable of doing everything such as storing JSON object, DB replication and so on. Beside that it is also open source software. In this post I demonstrate some basic commands of  PostgreSQL for beginners. The first thing you need to know […]

Categories
PostgreSQL

PostgreSQL database replication

In PostgreSQL 9.1 and later database replication feature is provided built in. This feature allows you to have high up time and very low risk of data lose. It is also useful for data mirroring and have high usage for load balancing (For example, very useful in designing banking system). To know more please refer […]

Exit mobile version