I am trying to set up replication for PostgreSQL on Ubuntu 20.04 and for the stand-by node I just need to install the PostgreSQL-server and not run initdb. Cluster creation on the stand-by will be taken care of when I will setup replication from master.
But, when ever I am running
sudo apt-get -y install postgresql
initdb is called and cluster is created. In other distribution such as RHEL, it is possible to not run initdb and just install the postgresql server using packages (https://www.postgresql.org/download/linux/redhat/).
Is there any way to get around this? or is this just how installation works on ubuntu when installing using apt-get?
pg_dropcluster
right afterapt-get