Questions tagged [postgresql]
PostgreSQL is a powerful, open source object-relational database system.
666
questions
0
votes
2
answers
3k
views
How can I connect to postgres using the IP address of the localhost?
This is a new installation of Ubuntu 20.04 on OCI. Postgres database has been installed and is running fine. The problem is I am unable to connect to the database using the IP address of the host. ...
1
vote
0
answers
481
views
setting up Postgres with wsl
So I recently came across wsl and was trying to configure postgres with it but I am not able to do so, I am following these instruction - https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-...
0
votes
0
answers
34
views
Migrate PostgreSQL DB from Multipass to Cloud?
I have a PostgreSQL database running on Ubuntu in a Canonical Multipass instance on MacOS. I'd like to migrate its data to a cloud DB (Digital Ocean in this case). Is it possible to publicly expose ...
1
vote
2
answers
1k
views
Cannot update/remove/reinstall postgresql 14
On Ubuntu 21.10,
When trying to do anything with apt on package postgresql (Ubuntu 14.4-1.pgdg21.10+1), the process hangs on the Setting up postgresql-14 [...] line :
$ sudo apt remove postgresql
...
3
votes
3
answers
15k
views
Run Pgadmin 4 on ubuntu 22.04
Installed pgadmin4 using this tutorial https://www.pgadmin.org/download/pgadmin-4-apt/ with the difference I just downloaded their https://www.pgadmin.org/static/packages_pgadmin_org.pub and put it as:...
0
votes
1
answer
411
views
Trouble with connection to PostgreSQL server on VPS Server
I'm trying to configure a database on my personal VPS server on Veesp, but it just doesn't work whatever I do. I configured both of pg_nba.conf and postgresql.conf files, so I can connect from ...
0
votes
2
answers
207
views
How to drop a PostgreSQL tablespace
I'm just starting setting up PosgreSQL 12 on Xubuntu 20.04, so I have created some things as experiments, and I want to delete them and start over. Hopefully without destroying everything, because ...
1
vote
0
answers
23
views
Why does writing to a PostgreSQL database (docker) shows some activity in the Network panel of the system monitor
A quick, yet simple question that came to my mind while observing my system monitor (I was curious on the RAM and CPU usage) while writing a massive data set to a PostgreSQL database hosted on my ...
0
votes
0
answers
2k
views
Trying to install a specific version of postgres, how do I know what version of libpq5 to install?
Viewing the answer in this thread - How to install libpq-dev (14.0-1) on ubuntu 21.10? -
Just install the required version of libpq5 and reinstall libpq-dev:
sudo apt-get install libpq5=13.4-1
sudo ...
1
vote
1
answer
2k
views
How to create offline installer for postgresql14?
I need to create offline installer for postgresql14 which can run without internet connection at all. As I see we can download .deb package via:
sudo apt-get install --download-only pkg_name
in such ...
0
votes
1
answer
326
views
postgresql is active with pgadmin4 but not showing anything in my php code
I'm new to ubuntu community or linux sounds better. so I don't have much knowledge of repositoies and packages. So, I've installed xampp, postgresql and pgadmin4 in my ubuntu 20.04 LTS. nothing showed ...
-1
votes
1
answer
602
views
Error while installing PostgreSQL 14.2 onto kUbuntu 20.04
i tried to install and get in run PostgreSQL 14.2 onto kUbuntu Version 20.04.
using instructions from several pages and it ends always with the same error.
i tried as described here:
https://www....
2
votes
2
answers
1k
views
Is there a way to install PostgreSQL using apt-get without it running initdb automatically?
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 ...
0
votes
0
answers
5k
views
Uncaught Error: Call to undefined function pg_connect()
I have following server cofiguration:
Ubuntu 20.04.3 LTS
PHP 7.4.13 (cli)
psql (PostgreSQL) 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1)
I have moved my web service based on WordPress from Windows to Linux ...
2
votes
1
answer
518
views
How does a apt repository work to find the available packages?
For example i have this apt ubuntu (21.10) repository for postgres in my sources.list.d:
deb http://apt.postgresql.org/pub/repos/apt/ impish-pgdg main 13
Which results in apt-get update to fetch:
Hit:...
0
votes
0
answers
2k
views
Setting Up PostgreSQL DB with bash script using variables from .env file
I'm trying to set up PostgreSQL with a bash script which takes the variables from an .env file.
My code -
#!/bin/bash
DB_NAME=$(grep DB_NAME .env | cut -d '=' -f 2-)
DB_USER=$(grep DB_USER .env | cut ...
0
votes
1
answer
2k
views
Postgresql 12 shuts down randomly
I'm using ubuntu 18.04 and postgresql 12,
See journalctl below:
Dec 16 09:39:19 server sudo[55084]: postgres : TTY=unknown ; PWD=/var/lib/postgresql/12/main ; USER=root ; COMMAND=/usr/sbin/sysctl ...
1
vote
1
answer
7k
views
postgres connect as different user
New to postgres. Till now I used mysql and whenever I needed to login I did this:
mysql -u root -p
which then prompted me to provide password for user root
But postgres feels a lot different than ...
0
votes
0
answers
194
views
Postgres apt upgrade on Ubuntu 18.04 hangs every time
On Ubuntu 18.04: any time apt lists postgres as available for upgrade, it hangs forever like this:
Setting up postgresql-server-dev-12 (12.9-1.pgdg18.04+1) ...
Setting up postgresql-12 (12.9-1.pgdg18....
0
votes
1
answer
3k
views
Can I stop postgres running in the background?
On Kubuntu 20.04
Before I can successfully start a docker container on my computer I need to kill a Postgres process. I do this by:
sudo ss -lptn 'sport = :5432'
,which outputs:
State Recv-Q Send-...
2
votes
2
answers
25k
views
How to install libpq-dev (14.0-1) on ubuntu 21.10?
I already have the postgresql of latest version(14.0-1.pgdg21.04+1).
I want to setup dev environment for psycopg2(https://github.com/psycopg/psycopg2/) library locally and it requires libpq-dev for ...
3
votes
1
answer
1k
views
How do I install PostgreSQL version 14 on Ubuntu 21.04?
Ubuntu 20.04 only gave me the obsolete PostgreSQL 12. After upgrading to "21.04 (Hirsute Hippo)" I got version 13. How do I install the latest version (14)?
1
vote
0
answers
197
views
Enabling password authentication for new postgres user
How do I make ubuntu prompt me for a password after creating a new postgres user. It doesn't ask for a password with the postgres user but I want to change this under an added user
1
vote
2
answers
3k
views
Cannot change PostgresSQL default user password
Recently I have faced with issue that I cannot change password that is used in pgAdmin for connection to remote database ...
In pg_hba.conf (PostgresSQL 12) I have the following login capabilities:
# ...
1
vote
1
answer
332
views
Skipping acquire of configured file 'https://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
I have recently installed Ubuntu 20.04 LTS and I am a bit fresh user for ubuntu. after installing postgresql 14, and I ran sudo apt update. Then it says
N: Skipping acquire of configured file 'main/...
0
votes
0
answers
173
views
Set up Postgres
I recently istalled PostgresSQL , but when I enter psql to the terminal, if gives me the error:
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or ...
0
votes
0
answers
580
views
Unable to install postgreSQL 9.6 in Ubuntu 20.04 [duplicate]
It worked hundred times in my ci/cd pipeline, but suddenly stopped to work and idk what could I broke.
According to this and/or this, I do:
lsb_release -cs # just for debug
focal
echo "deb https:...
0
votes
1
answer
168
views
How to drop superuser of PostgreSQL
I want to delete the user Mark but every time when I use the drop user Mark; command i get this message:
or if i try to drop the role i get the same error.
What am I doing wrong?
How do I fix this?
0
votes
0
answers
111
views
PostgresSQL dump version recognition Bash script
I often recreate variuos customer databases on local dockers
to test new ERP functionalities in the development environment
So, PostgreSQL dump file usually starts with:
--
-- PostgreSQL database dump
...
1
vote
0
answers
251
views
Could not set permission for new database on postgresql?
I'm the beginner in PostgreSQL, today I cannot create new TABLESPACE on my HDD disk. Specifically:
I'm running the Ubuntu 20.04 on the SSD. Install and using Postgres 13 normally on this disk.
I want ...
0
votes
1
answer
2k
views
`chown postgres` of a subdirectory not working for a new disk
To give postgres more space, I mounted a ssd at:
/mnt/fast_data/
What I'd like to accomplish is to give the postgres user ownership to the postgresql directory, so it doesn't say permission denied.
$ ...
1
vote
0
answers
2k
views
How to install PHP pdo_pgsql driver version 13.3 on Ubuntu 18.04
I have successfully installed some time ago a default installation of PHP 7.4 and of Postgresql v10 on my Ubuntu 18.04 LTS server.
Today I need to update my Postgresql version to 13.3 - but can't ...
1
vote
1
answer
3k
views
How can I see only the database I have access to in pgAdmin 4?
I created a free postgres database on Heroku, when connecting it to my pgAdmin4 the connection is done normally, however, thousands of databases appear along with mine. All the databases that appear I ...
0
votes
0
answers
100
views
Unmet dependencies when trying to install PostgreSQL with apt [duplicate]
I am trying to install postgresql in ubuntu 20.04, but facing unment dependicies issue.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet ...
0
votes
2
answers
353
views
Ubuntu shell script for starting multiple Postgres servers
I'm fairly new to Ubuntu and I'm tying to write a .sh script that starts up 2 postgres servers. I disabled pw requirement for sudo in /etc/sudoers
here is my script so far and it's probably incorrect. ...
1
vote
0
answers
36
views
I can't install libpq-dev on Ubuntu 20.04.2 [duplicate]
Problem
I can't install libpq-dev in ubuntu 20.04.2
I ran this command:
$ sudo apt-get update
$ sudo apt-get install libpq-dev
then I got errors bellow.
Reading package lists... Done
Building ...
5
votes
1
answer
15k
views
Why Ubuntu Server ask me to restart services?
I've installed latest Ubuntu Server on Linode. When I install some packages with apt-get, like node.js or postgres it stops and the window with question pops up.
How to disable this question window?
...
0
votes
1
answer
52
views
On two different servers, different services will not start, but if they are restarted, start successfully
On two different servers I have redis and postgresdb installed. Neither will start successfully on boot, but will start if they are manually started/restarted. The error for both are the same (failure ...
2
votes
0
answers
2k
views
ubuntu 20.04 sudenly using port 5432?
I was using a postgres docker just fine with ubuntu 18.04. Now I updated to ubuntu 20.04 and I suddenly can no longer start the docker, since the following error pops up - notice this error keeps ...
0
votes
0
answers
108
views
Trying to install libgcc but getting error from postgres
I was trying to execute this command on my ubuntu machine:
yum install libgcc.i686
But getting this error which seems meaningless here:
https://download.postgresql.org/pub/repos/yum/common/redhat/...
1
vote
1
answer
983
views
Installing PostGIS with GDAL 3.0.4
I have installed PostgreSQL on Ubuntu 18.04 using these instructions: https://computingforgeeks.com/install-postgresql-12-on-ubuntu/
Now I'm trying to install PostGIS extension:
sudo apt install ...
-1
votes
1
answer
132
views
SQL performance worsens on adding an INNER JOIN clause in Postgres [closed]
I have the following query
SELECT pri.*
FROM patientreceiptitem pri
JOIN patientfinancialtransaction_patientreceiptitem pp ON pri.id = pp.receiptitems_id
JOIN patientfinancialtransaction pft ON ...
0
votes
1
answer
8k
views
No module named 'psycopg2' + error during installation
I developed a python script which imports data to my Postgres DB and it works fine on my local machine but when I transferred it to the server it fails with:
Traceback (most recent call last):
File &...
0
votes
1
answer
3k
views
Pgadmin4 installation fails on Ubuntu 18.04 Bionic Beaver
I am trying to install pgadmin4 on Ubuntu 18.04 Bionic Beaver but every time I try to run the
sudo apt install pgadmin4 pgadmin4-apache2
it returns the following error:
Building dependency tree
...
4
votes
2
answers
1k
views
Installing Postgis in Ubuntu 18.04 with libgdal26-incompatibility with libgdal20?
I have been looking at this for a couple days now but I have not found a solution yet.
I am trying to install Postgresql-13-postgis-3 in my ubuntu 18.04 machine. Currently I have Postgresql 13 and ...
1
vote
1
answer
138
views
Restore mysql db from AWS AMI?
We have one EC2 instance running our mysql database server.
due to a security incident we had to delete the current EC2 instance as database was completely messed up with some sort of encryption.
So ...
1
vote
1
answer
660
views
unattended-upgrades and postgresql version
Can the apt dist-upgrade command On Ubuntu/Debian distros update the version of PostgreSQL?
I've some Ubuntu 18.04 LTS servers using PostgreSQL 9.6 and I don't want that unattended-upgrades execution ...
2
votes
1
answer
339
views
Major changes in sorting method of glibc on Ubuntu 18.04 after upgrading to Ubuntu 18.04.5
I had an Ubuntu 18.04.0 with Postgres 9.6.
Before Ubuntu upgrade following command result was:
vodka@ubuntu140:~$ ( echo "1-1"; echo "11" ) | LC_COLLATE=en_US.UTF-8 sort
1-1
11
...
2
votes
0
answers
342
views
Connect to Postgres via WireGuard
I forwarded the Postgres port for the WireGuard client:
iptables -t nat -A PREROUTING -p tcp -d 186.29.26.175 --dport 5432 -j DNAT --to-destination 10.50.0.4:5432
Please tell me is this the correct ...
1
vote
1
answer
2k
views
Postgresql service stopping on its own in ubuntu server
In the postgresql log file, I found message:
startup process (PID 1886772) was terminated by signal 9: Killed
Although upon restarting service, postgresql database starts functioning normally. ...