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.

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

Install Postgres database on FreeBSD

How does one go about discovering and installing the Postgres database system onto a FreeBSD machine? Must one install the entire gig of data for the entire Ports tree, and then compile from source? ...
0
votes
1answer
40 views

How to not restart a systemd service, when the service it depends on is restarted

Let's say I have a service that depends on postgresql: I have it set up with the following directives After=postgresql.service Requisite=postgresql.service When I restart postgresql the above ...
2
votes
0answers
86 views

hourly cron job runs fine except at midnight

I have a cron job which is set to run hourly using 0 * * * *. The command is to run a postgres query and output to a file: 0 * * * * psql foo -f /home/foo/stats.sql >> /home/foo/stats.txt This ...
0
votes
1answer
14 views

Instaling ThingsBoard on Docker with PostreSql

So I'm trying to install ThingsBoard using Docker on a MacBook Pro. I'm following the instrutions on (https://hub.docker.com/r/thingsboard/tb-postgres/) After the instalation I need to configure the ...
0
votes
0answers
23 views

psql dump local to remote server: No such file or directory

psql -f alldb.sql postgres output alldb.sql: No such file or directory Already tried "psql: could not connect to server: No such file or directory" and https://stackoverflow.com/...
0
votes
0answers
6 views

[unknown]@[unknown] LOG: failed to send SSL negotiation response: Connection reset by peer postgresql

After some time I'm cannot connect to postgresql database server. Using pg_connect() in PHP code and from terminal with psql This is log in database client $:/home/agus/.postgresql# PGPASSWORD="xxxx"...
0
votes
0answers
33 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
34 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
25 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
26 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
69 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
76 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
88 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
70 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
45 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
91 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
392 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
148 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
150 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
43 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
197 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
35 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
28 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
151 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
37 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
55 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
126 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
184 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 ...
2
votes
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
7k 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
88 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
528 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
84 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
48 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
100 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
66 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
839 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
33 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
156 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
216 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
183 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
234 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
2k 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
296 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 ...