I am planning to use a pgpool instance with 2 Postgresql databases only to run parallel query without replication.
Can I add a new node to pgpool without blocking the whole system?
Thanks a lot
Yes sure you can add another postgresql server. Prepare your database and the open your pgpool.conf file and add another server on it and reload your pgpool.
Reload command is: service pgpool reload
Related
Let's say you have added a postgres cluster on pgadmin4.
Does using delete/drop actually drop the cluster? or it just drops from pgadmin4? and nothing happens to the actual cluster.
I am a superuser, so definitely don't want to try it.
I always have to be very careful while disconnecting the server.
Yes, the Delete/Drop option will remove the server from the PgAdmin4 Server tree, but does not delete/drop any data or databases
I have three servers. One is running pgpool, another two in master-slave mode streaming replication. When installing pgpool, I was suggested to install the pgpool_regclass on my database servers as well. There's no problem installing it in the master node, but when I tried to do the same in the slave, I got error ERROR: cannot execute CREATE EXTENSION in a read-only transaction.
I think it's because the slave is a hot standby, and SELECT pg_is_in_recovery(); returns true. So I wonder am I supposed to install pgpool_regclass on the slave or not. It seems not, but pgpool doc says I should install it on every database pgpool is going to access.
I found the cause. Delete the recovery.conf file in the slave database, and then run pgpool_regclass. Otherwise, the slave is in recovery mode and cannot execute write commands.
I have a python app running on Heroku using a PostgreSQL database. If I create a database follower, will that follower be used to balance the read database load automatically? I know this provides me a failover copy of sorts, but will it relieve my database load?
No -- you'll need to configure your Python software to send SQL queries to both the follower AND the master database in order to actually 'relieve' your database load.
If you're using Django, you'll want to read this: https://docs.djangoproject.com/en/1.8/topics/db/multi-db/
If you're using SQLAlchemy, you'll want to read this: read slave , read-write master setup
I have a weird problem since I updated my Postgresql to 9.4 on my Ubuntu Server.
Every time I restart the server, I need to restart manually my PostgreSQL database as well in order that it listen the IP adresses that are in the postgresql.conf file:
Do you have any idea why it might happen?
Thanks!
Edit: The order of services on startup if that can help:
I know the way to set up a Master/Slave DB in Postgres is having 2 DB servers, but unfortunately i have only one server for now.
How can i mirror my production db into another "backup db" in "real_time"? I want to give access to another user to the mirrored db, so even if he does something there it will not affect production.
Nothing stops you setting up hot standby streaming replication, or another replication option like Londiste, between two PostgreSQL instances on the same computer.
The two copies of PostgreSQL must use different ports, but that's the only real restriction.
How to set up the second PostgreSQL instance depends on your operating system and how you installed PostgreSQL, which you have not mentioned.
You'll want to use streaming replication with hot standby if you want a read-only replica. If you want it to be read/write, then you can do a one-off copy of the database with pg_basebackup and not keep them in sync after that. Or you can use a tool like Londiste to replicate changes selectively.
You can run multiple instances of PostgreSQL on the same computer, by using different ports.