Dropping server on pgadmin 4 - postgresql

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

Related

Backup/Restore with pgAdmin

I'm not sure that I actually have a problem, but I am confused. I wanted to move a PostgreSQL database from PythonAnywhere to an AWS RDS server. I connected to both servers with pgAdmin from my Windows PC (ssh tunnel with PuTTY). I then did a backup of the database from PythonAnywhere and then did a restore to a clean database on the RDS server.
The backup had no issues, but, while the restore seemed to run fine, pgAdmin showed the process "Failed". The database on the RDS server looks fine. I checked row counts on a few tables, and they matched what I had on PythonAnywhere. I don't see any messages in pgAdmin other than that the process failed. I don't see anything in the pgAdmin logs to indicate what might be wrong. Do I have a problem? Should I use a command line restore instead?
Thanks for any insights.
--Al
Using cli is a better way, the ide may not give full errors. pg_dump will work for you. Maybe you should build a EC2 for this job.

pgadmin db restriction server property not working

I have a heroku postgres database. On pgadmin i can see over 1,700 databases since they are all on the same host. I have set the server connection settings as provided by heroku and i can see my database highlighted in yellow and can access it normally.
I tried disconnecting from the server than edit the db restriction property in the advanced tab and put in my database name(same one as the maintenance db, and without ''). I press save, i reconnect to the server but i can still see all the databases of the server and all the live data of the entire server. Am i missing something?
DonĀ“t download the latest version of pgadmin 4(v.6.10), instead download the v.6.9
link:
https://www.postgresql.org/ftp/pgadmin/pgadmin4/v6.9/windows/
I believe that latest version is buged when we try to especify a dbname for restriction
uninstall 4(v.6.10) and replace (v.6.9)
i faced the same problem here, but installed (v.6.9) and worked great, and brings me only my database
for pgadmin4 you dont need single quotes ... just write the dbname and then tab
How to hide databases that I am not allowed to access
result-image

"error: too many connections for database 'postgres'" when trying to connect to any Postgres 13 instance

My team and I are currently experiencing an issue where we can't connect to Cloud SQL's Postgres instance(s) from anything other than the psql cli tool. We get a too many connections for database "postgres" error (in PGAdmin, DBeaver, and our node typeorm/pg backend). It initially happened on our (only) Postgres database instance. After restarting, stopping and starting again, increasing machine CPU/memory proved to do nothing, I deleted the database instance entirely and created a new one from scratch.
However, after a few hours the problem came back. I know that we're not actually having too many connections as I am able to query pg_stat_activity from psql command line and see the following:
Only one of those (postgres username) connections is ours.
My coworker also can't connect at all - not even from psql cli.
If it matters, we are using PostgreSQL 13, europe-west2 (London), single zone availability, db-g1-small instance with 1.7GB memory, 10GB HDD, and we have public IP enabled and the correct IP addresses whitelisted.
I'd really appreciate if anyone has any insights into what's causing this.
EDIT: I further increased the instance size (to no longer be a shared core), and I managed to successfully connect my backend to it. However my psql cli no longer works - it appears that only the first client to connect is allowed to connect after a restart (even if it disconnects, other clients can't connect...).
From the error message, it is clear that the database "postgres" has a custom connection limit (set, for example, by ALTER DATABASE postgres CONNECTION LIMIT 1). And apparently, it is quite small. Why is everyone try to connect to that database anyway? Usually 'postgres' database is reserved for maintenance operations, and you should create other databases for daily use.
You can see the setting with:
select datconnlimit from pg_database where datname='postgres';
I don't know if the low setting is something you did, or maybe Google does it on its own for their cloud offering.
#jjanes had the right idea/mention.
I created another database within the Cloud SQL instance that wasn't named postgres and then it was fine.
It wasn't anything to do with maximum connection settings (as this was within Google Cloud SQL) or not closing connections (as TypeORM/pg does this already).

RDS Postgres Logical Replication into EC2

I'm using postgres 9.5.7 in RDS and want to create a slave/read replica on an EC2 box. I've figured out how to get logical replication working on RDS and am able to use pg_recvlogical to tap into the replication slot on the EC2 box.
My challenge now has been that, unfortunately, RDS doesn't support pglogical and it seems that I'm left with either test_decoding or wal2json for my output formats. Is there something out there that knows how to take either of those formats and turn them into SQL that can be executed on the slave?
Most of the guides I've found online only go as far as getting pg_recvlogical working, and don't take that extra last step of showing how to actually get those changes into the slave database.
perhaps you want to check https://wiki.postgresql.org/wiki/Logical_Decoding_Plugins#decoder_raw
this plugins output a sql statements that can be run in slave postgres

Add a new Postgresql node to pgpool

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