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
-4
votes
0answers
17 views

Unknown psql password [closed]

When I type in psql forum to login into this database it asks for a password. I don't know this password. I can't fix this issue. First I installed then reinstalled, then I decided to use vagrant ...
2
votes
2answers
458 views

install postgresql-12 in CentOS-8 got No match for argument: postgresql12

I am trying to install postgresql-12 in CentOS-8 I added the postgresql repository according to postgresql.org website https://www.postgresql.org/download/linux/redhat/ dnf install https://...
0
votes
0answers
19 views

How to run a postgres command in python script and write it into a file? [migrated]

cmd1 = 'psql -h hello.com -p 5433 -U hell_ro-d hello-c \"COPY (SELECT info1,info2,info3,info4 FROM logs_info WHERE info1 > \''+str(timing)+'\' and info1 < clock_timestamp() ORDER BY info1 desc ...
2
votes
3answers
36 views

Replace text in between certain pattern in UNIX

I want to replace the Millisecond field from file with ":" patter to "." pattern. Input:- Jun 12 2018 3:33:49:000PM Jun 12 2018 3:33:49:850AM Desired Output:- Jun 12 2018 3:33:49.000PM Jun 12 ...
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
2answers
52 views

(Debian 9) Why is there a postgresql server running on my local machine?

I began following https://www.postgresql.org/docs/9.6/runtime.html for setting up a local postgresql server for testing and development purposes. I discovered that I already have the postgresql ...
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
1k views

postgresql doesn't start with Linux

I'm facing a problem with postgresql, when I try to execute queries with psql I'm getting this kind of error: psql: could not connect to server: No such file or directory Is the server running ...
28
votes
3answers
72k views

Couldn't find postgresql.conf & pg_hba.conf files in my postgresql installation

Following all the instructions from UNIXMEN, installed postgresql-9.4 in CentOS 6.4. Everything went well, started the service and could access pgsql screen. But when I try to configure the phpPgAdmin,...
1
vote
4answers
959 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 ...
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. ...
0
votes
1answer
71 views

Is an executable portable between different Nixos hosts which reference different nixpkg commits?

I'm trying to get an executable to work by just copying it directly from one Nixos host to another. It works/executes on only one of the hosts. On old host (where it works): [root@...
0
votes
0answers
65 views

E: Unable to locate package postgresql-client-10

I am trying to run a container and I have to install ruby:2.5-slim and I have a dependency on postgresql-client-9.4. When I try to install this, why am I getting the following error message? Reading ...
5
votes
3answers
45k views

How do you stop posgresql on centos 7?

How does one stop a Postgresql instance, 9.2, on CentOS 7. I found nothing under /etc/init.d/ nor a ctl program.
1
vote
0answers
40 views

differences between two rsync commands

I'm following the postgresql documentation for upgrading a cluster of 2 machines - one primary and one secondary (with replication..). According to the docs, I need to upgrade only the primary and ...
0
votes
0answers
20 views

Uploading Postgresql repo to CentOS

I've been wrestling with getting my repo set up on Vultr CentOS server, and ran into several issues. In short, I want to know how people get their backend repo up on the CentOS server. Is moving the ...
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, ...
0
votes
1answer
141 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
1answer
1k views

PostgreSQL Remote Connection debugging

I'm having issues connecting to my PostgreSQL database from an online source. PostgreSQL seems to be setup up fine it is running on it's default port 5432 and the postgresql.conf has the following ...
0
votes
1answer
50 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
57 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
107 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 ...
1
vote
1answer
50 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
36 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
18 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"...
6
votes
3answers
39k 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 ...
-1
votes
1answer
99 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,...
3
votes
1answer
1k views

Authentication not working in Dovecot and PostgreSQL

I want to put my own mail server on VPS using Postfix, Dovecot, LMTP and PostgreSQL database. I can't send messages from VPS using the mail command, ie I don't receive these emails at my replacement ...
2
votes
1answer
30 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 ...
88
votes
4answers
233k views

Command to list PostgreSQL user accounts?

There are createuser & dropuser commands: createuser - define a new PostgreSQL user account dropuser - remove a PostgreSQL user account Is there a corresponding way to list the user accounts? ...
1
vote
1answer
60 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 ...
2
votes
1answer
3k 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
2answers
199 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
4answers
11k views

Where my PostgreSQL database backup is stored after run pg_dump?

Login as a pgsql user Typed the following command: $ su - pgsql Get list of database(s) to backup: $ psql -l I choosed users database Type the following command $ pg_dump users > users.dump....
0
votes
1answer
69 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-...
1
vote
2answers
2k views

ERROR: Failed to build gem native extension on Arch (postgresql)

I can't install gem pg on Arch due to the error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /home/alex/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb checking for pg_config.....
1
vote
1answer
3k views

AWS linux - How could I install postgreSQL on amazon linux?

I want to install postgreSQL on Amazon linux. Please let me know what I should type in regular sequence. I saw some of questions about installing postgreSQL on linux, but there is no example about ...
0
votes
1answer
787 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 ...
0
votes
2answers
222 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
1answer
91 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
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 ...
1
vote
1answer
149 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
5k views

ufw won't allow connections to port 5432

I've installed Postgresql 9.4 on Ubuntu Trusty from the PGDG ppa. I've created a database and set it listen-addresses to '*'. I've made an entry in the pg_hba.conf file. I can connect locally with no ...
0
votes
1answer
154 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
2answers
168 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
1answer
121 views

Issue with dropping table which contains special char in tablename. (Linux&Postgres)

I am facing issue with DROP table command in Linux (backend : Postgres). I have a table named "prabhu2016-02-08--2016-02-15". when I drop this table using below commend i am receiving error.... ERROR:...
0
votes
2answers
591 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@...
1
vote
2answers
2k 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
0answers
246 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
49 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 ...