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
-1
votes
2answers
2k 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
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
2answers
135 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
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 ...
1
vote
1answer
3k 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
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
1answer
54 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
309 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
702 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
5k 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 ...
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
595 views

Unable to start postgresql

Whenever trying to start postgresql however it fails. I am running Kali NetHunter. Here's my terminal output root@kali:~# service postgresql start [....] Starting PostgreSQL 10 database server: ...
-3
votes
3answers
275 views

Keeping postgresql files from being deleted every reboot? [duplicate]

Every time i restart my Kali machine, my postgresql service cannot start properly. For a while i did not know what it was, but i soon found out that this directory and file keeps being deleted. /var/...
0
votes
1answer
181 views

libnss-pgsql2 - getent group fails

i have set up pam and nss on a linux server (ubuntu 16.04) to get users and groups from a remote postgresql database. Login on the server is fine, but groups can not be loaded out of the database. If ...
1
vote
4answers
788 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 ...
0
votes
1answer
78 views

Does postgresql by default have a database named `postgres`?

From http://suite.opengeo.org/docs/latest/dataadmin/pgGettingStarted/firstconnect.html, it says: Run the psql command from the postgres user account: sudo -u postgres psql postgres Does the first ...
0
votes
1answer
415 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 ...
1
vote
2answers
325 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
303 views

How to split Excel table into CSV files in .doc by Bold text?

You have 777 .doc files where each .doc file contains a big Excel table, like one here and in Fig. 1. Here, only consider one .doc file. I want to divide the Excel table of .doc file into CSV files ...
0
votes
1answer
102 views

Fail to change user from postgres to other

When I try to change user (starting as postgres user) using the command sudo -i -u ubuntu The password for postgres is prompted. Now the postgres account was created upon installing postgres, and I ...
2
votes
1answer
1k views

Cron : Why are my cron scripts not running even though cron is running

I have a 4 scripts to transfer database from one server to other for testing purpose. These scripts execute automatically in the night. When I call the scripts manually, I get no error, but without ...
0
votes
1answer
79 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 ...
1
vote
1answer
345 views

java.net.BindException: Address already in use when running puppetdb and jira

I'm trying to run both jira and puppetdb both on the same server using the same postgresql database. When I enable jira first, puppetdb throws the following error: $sudo /opt/puppetlabs/puppet/bin/...
0
votes
2answers
2k views

PATH problem when adding postgresql to .bash_profile

Good day all, After I installed postgresql, adding an export PATH variable into the bash_profile and then restarting it caused all of my default PATH variables to not work anymore, including /usr/bin,...
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/ ...
1
vote
1answer
2k views

How to verify, that a DB hive already exists?

We create a hive database using expect script and with some other commands. In the case if we run the expect script again on the machine that hive already created, we get this: ERROR hive already ...
0
votes
1answer
396 views

PostgreSQL Remote Connection on NAS Synology DS216j

This is what I would like to achieve: I have postgreSQL database running on NAS Synology Diskstation DS216j connected to my router. I want to be able to connect and use the database from remote ...
6
votes
1answer
945 views

How do I configure postgres's authorization settings in nixos?

On nixos, I face a postgres error psql: FATAL: Peer authentication failed for user "postgres" similar error to this question, and would like to edit the authentication settings to resolve the issue ...
0
votes
1answer
516 views

PostgreSql port open on NAS Synology DiskStation (DS216j)

How is possible to check if the port 5432 of my NAS synology DiskStation (DS216j) (IP address 192.168.0.16 ) is open? I have (in the control panel of the NAS), enabled the firewall and created a rule ...
1
vote
1answer
7k views

PostgreSQL installation on a Synology DiskStation (DS216j) & pgAdminIII

I have a local postgreSQL database installed on my linux computer. I would like run this database on a NAS Synology DiskStation (DS216j) instead. I followed this guideline until step 2: http://...
0
votes
1answer
723 views

No space left on disk (PostgreSQL)

I was trying to write a 55GB SQL file to my database. It used to crash each time. I removed logs and did some cleaning to get the server running, but the transaction never used to complete. Latter, I ...
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 ...
3
votes
1answer
3k views

How to save psql error message output in bash variable?

I have a script that runs several different psql statements. I'm trying to capture the error output from psql when password entered is incorrect. The password is entered in before the check (and when ...
0
votes
1answer
1k views

PHP Failing to connect to Postgres on CentOS 7

I can connect to my database by running php via the bash: php -r '$link=@pg_connect("host=fakehost.edu port=5432 dbname=db user=user password=totallynotthepassword");if($link){echo "connected";} ...
3
votes
1answer
962 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
7k views

Cannot telnet to private IP or to port

What specific changes need to be made so that a CentOS 7 installation at local IP 192.168.1.6 can telnet to another CentOS 7 installation at another local IP 192.168.1.5? As you can see, 192.168.1....
0
votes
1answer
68 views

PostgreSQL Ubuntu 16.04

I installed PostgreSQL under Ubuntu 16.04 and want to work with a database postgis_in_action. I logged into the database and created a schema and two tables. I'd like to work with pgadminIII and so ...
0
votes
1answer
998 views

PostgreSQL Failed to startup

I am having trouble with starting PostgreSQL on my CentOS system. Here are my error logs below. Any help will be greatly appreciated. 2017-04-25 03:18:12.553 CDT > LOG: could not bind IPv6 socket:...
-2
votes
1answer
465 views

Start PostgreSQL Service Failed [closed]

When I try to start my postgresql server on CentOS I get a message to say that it has failed to start it. I have made sure to initialise the db using "service postgresql initdb". Does anyone have any ...
1
vote
1answer
965 views

Split a large postgresql dump into smaller files

I have an old postgresql dump that is 1.4GB large containing hundreds of tables and its data. in the file, there are first all table create statements and then all data inserts. I can split the file ...
1
vote
1answer
798 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 whoami@172.X.X.20 anotherdb ...
0
votes
1answer
941 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
441 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
499 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
1answer
49 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 ...
2
votes
1answer
515 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
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 ...
1
vote
1answer
985 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-...
3
votes
0answers
2k 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
105 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 ...