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.

67 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
4k views

How to install PostgreSQL 9.3 in FreeBSD jail?

I configured virtual NICS using pf, and a jail for FreeBSD using qjail create pgsql-jail 192.168.0.3. When I tried to install PostgreSQL 9.3 using port collection, it shows strange message at first. ...
3
votes
0answers
232 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-...
2
votes
0answers
83 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 ...
2
votes
0answers
478 views

Postgres Vulnerability through public schema?

On Debian 8.5, I'm finding weird processes and files in /tmp: file "cool" is owned by root, group=postgres<br> file "Injection.sh", "zeroteam.so", "zteam" Why do those file exist? How can I ...
2
votes
0answers
70 views

What is the equivalent to this apt-get when installing PostgreSQL extension for acoustid?

On bitbucket, it says to install the extension using sudo apt-get install postgresql-9.X-acoustid. but I'm running on CentOS... when I replace apt-get with yum: $ sudo apt-get install postgresql-9.X-...
2
votes
0answers
241 views

Firewall config prevents hibernate connecting to postgres in CentOS6.3

I have an operating environment in CentOS 6.3 that has tomcat7 and postgres9.2 installed. There is just one web application deployed in tomcat that tries to establish a connection from localhost to ...
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: ...
1
vote
1answer
295 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
4answers
785 views

Linux - how do I ignore special characters between “ ”?

My file: (1 sample line) MMP,"01_janitorial,02_cleaning_tools",1,,CUBIC_INCH,"(14) tray capacity, 6" upright with 3" spacing, mounts on 48"W x 24"D, taupe epoxy, fits MetroMax i & MetroMax Q ...
1
vote
2answers
324 views

How can I port-forward OpenShift with standard UNIX commands?

The OpenShift Origin Client Tools allow to forward ports (example command: oc port-forward postgresql-1-a7hrv 5432). However, my database backups are fetched from a FreeBSD box. Apparently the oc ...
1
vote
1answer
438 views

Using input from two different files in a for loop

I have a list of files that I want to search across a list of database tables: [root@host hs]# head -n 3 tables rec_playinth120116 rec_playinth120216 rec_playinth120316 [root@host hs]# head -n 3 ...
1
vote
1answer
497 views

How to run pgpool(or any service) through postgres(any specific) user

I am trying to setup HA solution for PostgreSQL. For that, I am running pgpool service. In that service, it calls a script whenever my primary node fails by calling it like this: /etc/pgpool-II-94/...
1
vote
1answer
2k views

How to Enable pg_stat_statements module in postgresql(9.4)

I have installed postgres database of version 9.4.1 through source code method ( not by rpm installation) so left out the option of installing postgresql-contrib, Now i need to enable the module ...
1
vote
0answers
344 views

How can I import CSV file into a PostgreSQL based on condition

I have CSV file that contains records for all the provinces (chm, mk ...). file.csv: time,language,province,longitude,latitude number en chm number number number en mk number number ...
1
vote
2answers
476 views

How to log PostgreSQL table data changes into syslog?

I have a program which uses these tables, and I want to add some additional functionality to its logging without modifying the program. groups ------ id bigint not null name character varying(100) ...
1
vote
0answers
53 views

Not able to install postgresql in Ubuntu 14.04

I tried many times installing postgresql in Ubuntu 14.04 without success. I keep getting the following error: Can't exec "/tmp/postgresql-common.config.WJ3dGb": Permission denied at /usr/share/...
1
vote
1answer
78 views

Postgresql error after upgrading database

We recently upgraded POSTGRESQL to 9.4.4 and now when my application tries to run a query I am getting this error. LOGS: 2016-03-15 16:34:51 ERROR http-nio-8282-exec-2:FeedRestController:224 - org....
1
vote
0answers
418 views

Installing Ubuntu and PostgreSQL database on different drives

I just received a new root server (this one) with the following drives: Disk /dev/sda: 480 Gb Disk /dev/sdb: 480 Gb Disk /dev/sdc: 240 Gb Plus the 240Gb SSD. Both sda and sdb are set up on RAID-1 ...
1
vote
1answer
1k views

how to update postgres.conf path after relocating it from data directory

I'm installing a Postgresql-9.4 HA environment in RHEL 7, when I initialize postgres db - it creates a data directory and within the data directory goes postgresql.conf & pg_hba.conf files. Here, ...
1
vote
0answers
294 views

problem installing postgresql (opengeo) on fedora 22

I'm following the directions found at http://suite.opengeo.org/4.1/installation/redhat/install.html i created gedit /etc/yum.repos.d/OpenGeo.repo with the following text: [opengeo] name=opengeo ...
1
vote
2answers
390 views

many missing dependencies , no links (centOS 7 , postgresql 9.3)

I am trying to install postgresql 9.3 on centOS 7 first , I needed to install libxml2 , and then I tried to install libxml2-devel /$ rpm -iUvh http://xmlsoft.org/sources/libxml2-devel-2.9.2-1....
1
vote
0answers
2k views

Postgresql 9.1 - Kali Linux

I started to read this book : http://www.amazon.fr/Metasploit-The-Penetration-Testers-Guide/dp/159327288X And I have some trouble with postgresql 9.1 (in Kali Linux). When I start msfconsole, I ...
1
vote
0answers
604 views

PostgreSQL installation error in debian

I'm trying to install PgSql in the system with following specs: Distributor ID: Debian Description: Debian GNU/Linux 7.1 Release: 7.1 x86_64 But I am getting an error like this The ...
1
vote
0answers
290 views

Add Solaris utf-8 support for Postgresql

I need to use utf-8, but "locale -a" produces: C POSIX iso_8859_1 the os is: SunOS cteraportal 5.11 NexentaOS_134f i86pc i386 i86pc Solaris Additional info: root@cteraportal:~# dpkg -l locales ...
1
vote
1answer
494 views

Change default python distribution for postgres from the system's python (to Enthought Canopy)

On an RHEL6 system, I'd like my postGIS implementation (ie my postgres/postgresql databases) to use Enthought's Canopy distribution of python, rather than the built-in GNU's distribution. (This is ...
1
vote
0answers
2k views

“No PostgreSQL user name specified” - possible concurrency issues?

For my dissertation I'm running the same cronjob on around 300 machines, which is: 10,25,40,55 * * * * /path/to/db_script.sh 1>/dev/null This script gets some values from the system (whether ...
1
vote
2answers
2k views

pgbouncer startup problem

I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup. When I start pgbouncer, I get the error Cannot open logfile: '...
0
votes
1answer
13 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
30 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 (...
0
votes
1answer
24 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
68 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
65 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
0answers
88 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
0answers
140 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: ...
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
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
148 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 .../... (...
0
votes
1answer
120 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/...
0
votes
1answer
515 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 ...
0
votes
2answers
96 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
211 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
181 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@...
0
votes
0answers
363 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 ...
0
votes
1answer
23 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
0answers
43 views

How to create Ambari database backup without enter password?

We've configured the file .pgpass as the following and in order to create database backups without to enter a password -bash-4.2$ more .pgpass localhost:5432:postgres:ambari:bigdata -bash-4.2$ pwd /...
0
votes
1answer
414 views

postgres processes running while not using it

as in the object of the discussion thread I have the following situation: all time I start my linux OS, I check processes running with the top command in bash and I always find 7-8 postgres processes ...
0
votes
1answer
78 views

How to send a request to Pgpool2 server from php script?

Actualy i'm trying to create a postgres replication system using pgpool2 and docker containers, I created 2 containers running postgres and another container for pgpool2, so when I tried to connect to ...
0
votes
1answer
52 views

Barman >1.5.1 for Ubuntu 16.04

I use Barman 1.5.1 on Ubuntu 16.04. For several weeks, barman has been working smoothly. Some days ago I noticed something strange. Instead of backups I find other files in the <SERVER>/base/ ...