Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [postgresql]

PostgreSQL, often simply Postgres, is an object-relational database management system (ORDBMS) available for many platforms including Linux, FreeBSD, Solaris, Microsoft Windows and Mac OS X.

0
votes
0answers
21 views

Why is the postgresql `libpq.so.5` shared library not being found on Nixos?

I'm trying to get an executable to work, it's currently running fine on one Nixos host, but not the new one. On old host: [root@XenonKiloCranberry:~/blog]# ldd app linux-vdso.so.1 (...
-1
votes
1answer
18 views

postgres, linking libpq.so instead o libpq.so.5

I installed rh-postgresql96 and rh-postgresql96-postgresql-devel on RH and I discovered that there is no libpq.so.5 but only libpq.so. the point: I built my C++ binaries using PG, standard one not RH,...
2
votes
1answer
23 views

Does 'sudo apt-get purge postgr*' remove database files?

I ran sudo -u postgres psql -c "show data_directory" and it shows /var/lib/postgresql/9.5/main. If I understand correctly, this is the directory that stores the database files. I ran sudo apt-get ...
0
votes
1answer
19 views

How to properly spawn postgresql server via runit

I'm trying to get my head around Voidlinux and runit in particular. Void had postgresql v9 in its repos, I needed something newer, so I compiled v12 from source. It works ok, but now I'm struggling ...
0
votes
2answers
59 views

Ubuntu could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

I'm trying to create a new user form my rails application. I already ran psql -p 5432 -h localhsot -U postgres and created a new user. Then I added the user with sudo adduser user_name and afterwards ...
0
votes
1answer
73 views

Accessing Postgresql from terminal

After recently setting up Postgresql on my Raspberry Pi I created an account which is not a power user. Initially to set this up I entered psql from the terminal and then executed createuser pi -P ...
1
vote
1answer
64 views

Why does postgresql server have a `localhost:57504` to `localhost:57504` UDP “connection”?

$ sudo netstat -ap | grep postg tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres udp 0 0 localhost:57504 localhost:57504 ...
1
vote
1answer
46 views

Why is mysql server accepting nonlocal request, while postgresql server is not?

By default configurations, why is mysql server accepting nonlocal request, while postgresql server is not? $ nmap -p0-65535 192.168.1.97 Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-20 14:34 ...
0
votes
1answer
56 views

all commands hang forever

After ssh into a VM, I am not able to run basically any command such as ps aux, cd /proc; ls, top, dmesg or systemctl status, all of them hangs, so I don't even know how to spot the problem. Linux ...
0
votes
1answer
39 views

Moving postgresql data folder on Mint 19.1

I want to move my data folder from my SSD do HDD on my Linux Mint 19.1 Cinnamon. I have install postgresql from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads version Linux x86-...
0
votes
0answers
76 views

phpPgAdmin 5.6 for Debian

I saw phpPgAdmin 5.6 for PostgreSQL is released, but I can only install the 5.1 on Debian 9. I look for the package: apt search phppgadmin And just get: phppgadmin/stable,now 5.1+ds-2 all web-...
0
votes
2answers
322 views

root “su - <user>” got permission denied (Ignored)

Got permission denied when switching user from root to postgres. No issue switching from root to ubuntu. root@node-01:~# su - postgres su: Permission denied (Ignored) postgres@node-01:~$ logout root@...
0
votes
2answers
118 views

Separate systemd script for postgresql instances

I have PostgreSQL-11 installed on Ubuntu 18.04 via apt-get, and based from here, I managed to install 2 instances of postgreSQL on port 5432 and 5433. My Question is, can I have separate start-stop ...
0
votes
0answers
105 views

How can I import csv file with special characters?

I am trying to import CSV sheet to Postgres database using PG-ADMIN. I am able to import sheet but after importing sheet due to special characters values are changed. For example: Before Importing: ...
2
votes
1answer
40 views

Postgresql won't run on Mac

How can this be? Up util now it hase been working fine. $ brew services start postgresql Service `postgresql` already started, use `brew services restart postgresql` to restart. $ psql psql: could ...
2
votes
2answers
152 views

Using systemd I want my Postgresql ExecStop command to run at shutdown

I have a set of scripts that run constantly while Postgresql is up. I modified the ExecStop commands in my .service file so that a special script to stop those scripts and wait for them to complete ...
0
votes
3answers
27 views

How Change psql Versions?

My system is looking at usr/bin/psql and I need to use /usr/pgsql-10/bin/psql but I'm not sure how to change it. I don't feel like I should be deleting or renaming the first one. How can I get my ...
0
votes
1answer
47 views

Postfix: Whitelist all entries in address book

my postfix currently rejects emails that are potentially SPAM. Howver, some of my contacts have servers that are not correctly configured and I want to avoid rejecting their email. ...
0
votes
1answer
27 views

set alias to read variable and then use in second command; only works when I execute them manually

I am with CentOS 7 and I want to bind an alias to launch PostgreSQL shell(psql). I defined this alias and append it in /etc/profile.d/alias: alias psql-local="read -p \"PSQL: enter the DB to connect: ...
0
votes
1answer
7 views

Redirect DB traffic dependent on type of request

I have a Postgres cluster managed by Patroni and want to be able to redirect DB requests to the replica if they are read requests and write requests to the master. Does anyone know of any tools that ...
0
votes
1answer
131 views

How to install libpq.so.4.x on Debian 9

I try to compil from source PHP5.3.29 on Debian 9. The make command stopped in error at this step LDFLAGS="-Wl,-rpath=/opt/OpenSSL/openssl-1.0.1u/lib,-rpath=/opt/CURL/curl-7.26.0/lib" make .../... (...
2
votes
1answer
34 views

Unable to start postgres unless I type the command to restart it

Whenever I try to start my project the following error occurs. django.db.utils.OperationalError: could not connect to server: No such file or directory Is the server running locally and ...
1
vote
1answer
53 views

On FreeBSD, or other BSDs, what directory is commonly used for data folder storing the content of a database such as Postgres

I am wondering if there is a convention on where to store the data folder containing all the files for the tables and rows of a relational database system such as Postgres.
0
votes
1answer
104 views

How to use archive_command to send archives to remote server (postgres)

Im looking into continuous archiving. I have a running test but the archives are getting saved to the master I want to send them to different machine. my command: archive_command: 'cp %p /var/lib/...
1
vote
1answer
179 views

psql output in Debian is messed up

Width of the terminal window is 280 columns, and Debian prints text just fine. However, psql output is totally messed up. When I type a command, it's not wrapped: if I exceed 80 symbols in a line, ...
2
votes
1answer
40 views

How can I monitor, record and check about the ports on my LUbuntu having been scanned or connected to by other computers?

I have installed some servers on LUbuntu 18.04, such as postgresql server, mysql server, vino server, and I may have installed and run some servers without knowing it. I rarely intend them to be ...
1
vote
1answer
2k views

Unable to locate package postgresql-server-dev?

I am trying to install the following packcage postgresql-server-dev-9.5. Using sudo apt-get install postgresql-server-dev-9.5 Now, after I run this command I get this error: Unable to locate ...
1
vote
1answer
6k views

How to install pgAdmin 4 on Linux Mint

I'm running Linux Mint 19 Tara, and trying to follow the instructions here with the goal of installing pgAdmin4 as a desktop app. There seems to be a problem involving the authentication of the ...
1
vote
0answers
76 views

Remove new line in Postgresql log before sent to Graylog

i want to remove all new line in Postgresql log before sent them to Graylog. Example, 2018-08-30 00:00:00 WIB [29212] hi_user@myDatabase 172.21.253.44 LOG: duration: 1044.000 ms execute 32: ...
0
votes
1answer
449 views

How can I `initdb` of postgresql in CentOS7.2?

In CentOS 6 I can use service for initdb of postgresql-9.3: service postgresql-9.3 initdb But, in the CentOS7, I tried bellow, find I can initdb it: # service postgresql-11 initdb The service ...
1
vote
1answer
83 views

Can postgresql-9.6:i386 be installed on amd64 Debian(9) build? [closed]

So I am currently running a Debian 9 64-bit LINUX build (for some background). I have installed unixODBC (compiled as 32 bit) and odbc-postgresql:i386, now the final piece should be to install the ...
2
votes
1answer
44 views

Dumping postgres DBs into separate files

I inherited a postgres DB (which I have very little experience with) and trying to figure out a way to dump/back it up. I've been reading docs about it and can get as far as dumping the DBs into ...
0
votes
2answers
86 views

How to install `pg_recvlogical` to Centos 6?

I have a Centos 6 installed. I did yum update. I need pg_recvlogical. I didn't find it using yum search pg_recvlogical so I found it mentioned here. So I download it and wanted to install using rpm -...
0
votes
1answer
61 views

How to install npgsql to Debian?

How to install npgsql to Debian? Google gives me only an articles how to install PostgreSQL.
2
votes
1answer
4k views

Docker postgres “psql: FATAL: role ”root“ does not exist”

I started a postgres docker container using sudo docker run --name some-postgres -d postgres and then attempted to connect to it using sudo docker run -it --rm --link some-postgres:postgres ...
0
votes
2answers
788 views

Why can't I change directory to the current directory with permission denied?

I am trying to restore a database with the following command: $ sudo -u postgres pg_restore -C -d dvdrental dvdrental.tar [sudo] password for t: However, I am receiving the following error message:...
0
votes
0answers
30 views

Why can't I change directory to the current directory with permission denied? [duplicate]

I am trying to restore a database with the following command: $ sudo -u postgres pg_restore -C -d dvdrental dvdrental.tar [sudo] password for t: However, I am receiving the following error message:...
1
vote
1answer
149 views

Error installing Opennms on Oracle Linux 6.9

I need to install Opennms monitoring software because I'm getting error trying to install it on Oracle Linux 6.9. I used this commands: wget https://yum.postgresql.org/9.3/redhat/rhel-6.9-x86_64/...
0
votes
1answer
189 views

How can I start a service after PostGres has booted?

I'm using CentOS 7. I have a nodeJS server I want to run as a service, but I would prefer the service started after my PostGres 9.6 server had booted. I tried specifying after in my service ...
0
votes
0answers
177 views

How to clear /clean-up pg_xlog directory?

I have found myself in a situation where the pg_xlog folder contains 80GB of data maybe because wrong configuration how to purge or cleanup the files under pg_xlog? /var/lib/pgsql/data/pg_xlog [root@...
3
votes
0answers
221 views

Cannot install postgis2_94 on Centos 7.5

I am trying to install postgis2_94 on CentOS 7.5 with the following command (having already installed postgresql94 ): yum install postgresql94-server postgresql94-devel postgis2_94 postgis2_94-...
1
vote
3answers
1k views

Cannot install postgresql 9.4 on Centos 7

I am following https://www.postgresql.org/download/linux/redhat/ to install postgrsql 9.4 on Centos 7, using the command: yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-...
1
vote
1answer
281 views

GNUHealth installation fails

Today trying to install GNUHealth on my Fedora 27 (32bit). after creating user I tried to verify PostgreSQL. here's a file pg_hba.conf in /var/lib/pgsql/data. This shows following lines In this file ...
1
vote
1answer
23 views

Would Upgrading Postgres on CentOS Break It?

I am trying to install PostgreSQL server on my CentOS machine. From what I read here (https://www.postgresql.org/docs/current/static/upgrading.html) It seems like Postgres does not guarantee backward ...
-1
votes
2answers
2k views

Why can't I `su postgres`?

I wonder why when I provide root's password, the following command reports failure? $ su postgres Password: su: Authentication failure Is it correct that su asks for the password of root, not of ...
1
vote
2answers
1k views

Unable to restore PostgreSQL db backup getting “pg_restore: [archiver] unsupported version (1.13) in file header” error

I am using postgresql-9.4 (port 5432) and postgresql-10.0 (port 5433) on my Linux machine (RHEL 7.4). Postgresql-9.4 was installed using yum repository and Postgresql-10.0 was installed using source ...
0
votes
2answers
127 views

how to create postgresql database using linux commandline

I have tried to create a postgresql database from linux(CentOS) command line by executing the following, psql -U admin -p55432 postgres -c "CREATE DATABASE TEST_DB" Created database name appeared as ...
0
votes
0answers
355 views

cannot find a valid baseURL for repo : pgdg94

bonjour j'ai un soucis pour l'installation de postgresql dans mon serveur sme 9.2 a chaque fois que j'essaie de l'installer avec la commande yum install on m'affiche un message d'erreur "error:cannot ...
1
vote
1answer
2k views

How does postgresql.service know which postgresql instances to start?

I've installed postgres 9.5 on ubuntu 16.04 which creates postgresql.service and postgresql@.service. I understand that the postgresql.service spawns all enabled instances of postgres, and I can call ...
0
votes
1answer
22 views

Postgres: store login settings for multiple databases for quick login?

I have multiple databases that I am logging into on AWS and right now I am entering the full url for the database i.e., psql -d psql -d postgresql://user:pass@host:port/dbname more stuff I would ...