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
1answer
55 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
29 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
43 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
39 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
21 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
32 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
179 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
54 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
51 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
33 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
80 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
23 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
43 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
26 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
101 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
28 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
48 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
61 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
166 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
38 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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
5k 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
65 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
333 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
78 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
37 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
69 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
53 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
3k 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
667 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
26 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
135 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
115 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
166 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@...
2
votes
0answers
200 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
259 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 ...
0
votes
0answers
11 views

Find out details of the script associated with PID

By using the top command, I can see the processes running on my server: I have noticed that R and postgres are always using a considerable amount of CPU. How does one reveal the actual query or ...
-1
votes
2answers
1k 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
105 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
346 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
21 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 ...
0
votes
1answer
46 views

Postgresql tutorial files

Similar to this: https://stackoverflow.com/questions/23136670/where-can-i-find-tutorial-files-of-postgresql However I am trying to find the folder src/tutorial, to start the SQL tutorial, or even ...
2
votes
1answer
256 views

Server upgrade (yum update) removed psql local installation

I have installed locally a PostgreSQL server 9.6.2 on aws Centos server a while ago using these commands: rpm -i https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-...
-1
votes
1answer
568 views

How to pass a list to psql on command line?

I'd like to know if there's a way do so something like this : lab-2:/tmp# echo 46692,46694,46696,46704,46708,46709,46713,46730,46736,46574 > deletelist.txt lab-2:/tmp# cat deletelist.txt 46692,...
2
votes
2answers
4k views

initdb: cannot be run as root

I want to create a database cluster in PostgSQL on CentOS. When I type the command 'initdb', the result goes like the following: [root@cll agensgraph]# initdb initdb: cannot be run as root Please ...