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.

learn more… | top users | synonyms

1
vote
1answer
45 views

How do I grep a multi-line postgresql log?

If I need to search for some command in the system logs, this happens: $cat /var/log/postgresql/postgresql-9.1-main.log | grep 'UPDATE limit' 8833 2017-02-01 12:31:51 BRST [email protected] anotherdb ...
-1
votes
0answers
32 views

Pooler Error: pgbouncer cannot connect to server

I am running pgbouncer in unix socket. Have 2 postgres servers. Its working fine when use postgres server IP, but while using DNS domain (which configured with those postgres servers) in pgbouncer.ini ...
0
votes
1answer
24 views

create new locale on centos 6

Last Night there was power failure and the system was shutdown. When system was stated in morning, PostgreSQL db server could not start. While looking at the pgstartup.log file, following lines were ...
1
vote
1answer
46 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
41 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/...
0
votes
0answers
27 views

Move mysql/postgresql from /var/lib using systemd on CentOS 7.2

What's the proper way to move /var/lib/mysql and /var/lib/postgresql using systemd and symlinks on CentOS 7.2, ideally without editing conf files? I found a way to start both that doesn't use systemd,...
0
votes
0answers
47 views

Restarted postgresql, but “database ”my_db1“ is being accessed by other users”

I'm trying to delete a database. I've restart Postgresql service: sudo systemctl stop postgresql sudo systemctl start postgresql And yet: # drop database my_db1; ERROR: database "my_db1" is being ...
0
votes
0answers
18 views

PSQL in Chroot (partial) failure

i have a a chrooted (sshd jail) user, who needs access to a database, i gave him the psql binary and created him a postgres user. now when they connect, they can run all the grants i gave them (select ...
0
votes
1answer
11 views

PostgreSQL: Speed over reliability config

For my development machine I need no data consistency in case of a crash. Is there a config for a Debian-like system, that optimizes PostgreSQL for speed (even if it sacrifices reliability)? So ...
3
votes
1answer
49 views

Does SQLDriverConnect (from unix-odbc) cache the DSN data? If so, how can I clear/purge it?

While using the UNIX-ODBC libraries from unixodbc site, I'm facing a problem with the SQLDriverConnect api. If I try to connect to my database twice in a row, first with incorrect DSN data (Data ...
2
votes
0answers
118 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 ...
1
vote
0answers
69 views

Trouble using postgres sql in ubuntu 16.04

I am running Ubuntu 16.04 operating system and have recently installed postgres using the instructions given in https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-...
1
vote
1answer
422 views

Failed to start PostgreSQL database server. — all of the sudden [closed]

All of the sudden postgresql has broken down: $ sudo systemctl status postgresql ● postgresql.service - PostgreSQL database server Loaded: loaded (/usr/lib/systemd/system/postgresql.service; ...
1
vote
1answer
26 views

What does the parenthesized number in the “command” column mean for postgres processes?

When I execute ps aux | grep postgres or top | grep postgres I get all my postgres processes with some information, the last column (command) has the following structure: postgres: username db ...
1
vote
2answers
45 views

Installing Postgres App on Linux Mint

I've been put on a web app project that is built using Ruby on Rails and uses PostgreSQL for the database. All the other developers on the team have Macs so they just installed Postgres app to set up ...
0
votes
1answer
111 views

Installation of postgresql on linux mint 17.1 (problem with apt-get update)

I have a linux mint system 17.1 and I want to install postgresql. Now in trying to update the packages, I type: sudo apt-get update and here are the error messages I get: W: Unable to recover ...
2
votes
1answer
48 views

Why zsh behaves as less when querying a (postgresql) database?

Context zsh shell, oh-my-zsh framework, no special zsh's configuration about postgresql. Trouble I noticed an annoying behavior: when querying the database, e.g.: SELECT * FROM mytable ; it ...
0
votes
0answers
18 views

How to get PostgreSQL 9.4 dbconn from MATLAB in Debian 8.5?

I can assess psql, create tables and insert into tables, but I cannot get my client applications use the database. Test code in Matlab close all; clear all; clc; input = '123'; %/etc/postgresql/...
0
votes
1answer
32 views

How to run PostgreSQL as daemontools service?

svscanboot was ran and added to autostart added script from article http://thedjbway.b0llix.net/services/postgresql.html to /service/postgres/run and change mode a+x,root owner Add service: svc -u /...
1
vote
0answers
140 views

Use Letsencrypt certificates for Postgresql

I have successfully configured Letsencrypt for my NGINX webserver on Debian 8 Jessie. Now I have installed Postgresql 9.4 and want to use the LE certificates (in /etc/letsencrypt/live/mydomain/com/......
0
votes
0answers
70 views

PostgreSQL/PostGIS installation failed in CentOS 7

I have been struggling to install PostgreSQL and PostGIS on my Redhat Linux based CentOS 7 (x64) machine and so far I am still running into problems. I used this step by step tutorial to install ...
1
vote
0answers
119 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
17 views

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

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

sudo yum install postgresql doesn't work on CentOS 7?

I'm trying to install PostgreSQL on CentOS 7 (by following this guide to install Discourse) but when I give this command: sudo yum install postgresql91-server.x86_64 postgresql91-contrib.x86_64 ...
3
votes
1answer
100 views

Encrypt postgresql database

I am reading the postgresql database documentation, but I can't found nothing about encrypting the database files to prevent someone to see the data without the database password. There is some way to ...
0
votes
1answer
32 views

migrate running on Virtual Box PostgreSql instance to another machine

I have a PostgreSql instance that Run on Virtual Box at the Physical Machine A This instance is collecting real-time data, so any downtime is undesirable. I want to move this instance to the ...
0
votes
1answer
531 views

How to change the path of shared libraries shown by ldd?

I am trying to make the postgis extension work on my system and it always spits out "$libdir/postgis2.2" no such file or directory error. For my curiosity I executed "ldd postgis-2.2.so" and it spits ...
0
votes
1answer
120 views

How to use sqlformat tool with pgAdmin

I am trying to add external SQL formatting utility to pgAdmin. There is an option available in pgAdmin3 in Preferences -> Query tool -> Query editor called external formatting utility I set up ...
1
vote
2answers
84 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) ...
0
votes
1answer
113 views

Clean up conflicting postgresql installations

I have a little development box which I upgraded to Debian 8.5 (to have a current apache and postgres which better match the productive servers). Now I have both Postgres 9.1 (old) and 9.4 (which I'd ...
0
votes
1answer
869 views

Unable to start posgtresql, the reason isn't clear

I've installed postgresql by pacman. Now I'm trying to run it: $ sudo systemctl start postgresql Job for postgresql.service failed because the control process exited with error code. See "...
0
votes
1answer
93 views

Is there any way to Install postgres from Binary in linux machine irrespective of Linux build(Debian/CentOS/others)

I am trying to install postgres on different machine using ansible. Currently I am using postgres source to install on a partical location. Its taking too much time. Is their a way to run postgres by ...
1
vote
0answers
33 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
0answers
164 views

postgresql auth against samba active directory

I've recently set up a new Samba4 Active Directory to handle centralized authentication for my small office network. On this server is also a postgresql-9.5 instance, and I'm trying to have it ...
0
votes
1answer
133 views

What's the fastest way to install Postgresql on Wind River 7.0?

I'm new to bare-bones Linux systems and need to install postgres on a wind river Linux distribution. My plan was to install yum and then use yum to install the postgres rpm. I've tried to install ...
0
votes
1answer
15 views

1 VM host 2 PostgreSQL Databases

I'm very new to postsql. Here is my situation. There is an existing postsql running on my VM on port 1234 pointing to a database name : db1. Now, I want to add db2, will I need re-configure another ...
0
votes
1answer
145 views

Failed to start PostgreSQL 9.5 with systemctl - SELinux

I've installed PG 9.5 (/usr/pgsql-9.5/) and when I start it manually with postgres -D it has no problems, but if I try to use systemctl I get an error. By looking to journalctl -xen output, I see: /...
0
votes
0answers
91 views

Debian 8 crashes once every few days

I'm running Debian 8 on Linode 32 GB and once every few days the system crashes. This server is being used in productions and I need to find a solution ASAP The only server running on Debian is ...
2
votes
1answer
462 views

backup file locally in shell script

This is my crontab: crontab -e 30 5 * * * sh /home/donato/Documents/pg_bak.sh Every day at 5:30am I want to execute a shell script I created called pg_bak.sh. This is the contents of the shell ...
0
votes
2answers
135 views

Delete rows from postgres database contain string/sentence [closed]

I would like to know how to delete entire rows in a postgres table that contain a particular string in the title column. So if the string is: it is a sunny day How can I issue a command in postgres ...
3
votes
2answers
5k views

“psql: could not connect to server: No such file or directory”

Actually, I installed PostgreSQL 9.4 (with postGIS extension), and when installed, everything used to work fine. As said on many tuts, I've set the /data folder, checked configuration files, and so ...
0
votes
1answer
210 views

Using regexp_replace to replace single quotes around string but not within words e.g. can't

I'm using the below code from a bash script to replace single quotes from my title column in a postgres database with spaces. psql -U postgres -d my_database -c "UPDATE my_table SET title = ...
0
votes
1answer
321 views

Install PostgreSQL 9.5 CentOS 7

I'm trying to install PostgreSQL 9.5 on CentOS 7. I've searched online and to get access to the 9.5 RPMs it requires installation of pgdg95 via the following command: sudo rpm -ivh http://yum....
0
votes
1answer
398 views

syntax error: unterminated quoted string when using regexp_replace in bash script

I've added some code to the end of a bash script I am using. The code shown here is intended to copy a csv into my postgres table, and then remove brackets, quotes and double quotes from the title ...
0
votes
0answers
57 views

Upgrading postgresql to 9.3 on a CentOS 7 machine

I've recently rented a machine, with CentOS 7, to use for a Nominatim server. I've managed to correctly install Nominatim on the machine, with the instructions from the site, it works correctly, but ...
1
vote
1answer
217 views

How can I install PostgreSQL and PostGIS on Ubuntu 14.04 and enable remote access over the internet?

I would like to install PostgreSQL and PostGIS on my Ubuntu 14.04 virtual private server that is hosted in a remote datacenter. How can I enable remote access on them?
2
votes
1answer
138 views

Ways to restrict remote user to only access a remote database

I want to be able to setup a remote user that can update a PostgreSQL database on a production server. I have two machines, one is a local server that I use as a command and control system, named ...
3
votes
1answer
197 views

Copy csv data while simultaneously filling serial column

I've created my first postgres table and i'm trying to work out how to copy a .csv file into the table, whilst simultaneously generating a serial number number in column 1 (ID) which starts at number ...
1
vote
1answer
244 views

Chroot Postgresql Error

Currently I'm trying to create the first PostgreSQL 9.5 cluster on Linux deploy android 5.0.2, and it seems to be a shared memory error. FATAL: could not create shared memory segment: Function not ...
1
vote
1answer
756 views

SSH access asking for password in local network but public

I have a problem when ssh to another server. I created ssh-key and copied it to other server. -bash-4.2$ whoami postgres -bash-4.2$ ssh-keygen Generating public/private rsa key pair. Enter file in ...