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.
353
questions
2
votes
0
answers
81
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
1
answer
266
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 ...
2
votes
1
answer
732
views
Running a query without the OS cache
I want to emulate a client site who doesn't have much caching because they have so much I/O all the time. I want to run a SQL query on my machine (on my VM to be precise) with the same limitations ...
2
votes
2
answers
6k
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
2
answers
13k
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
4
answers
2k
views
Releasing a deleted but open log file
my Debian server disk maxed out because of a large postgresql log file and while I have deleted it, it is still held by postgresql. When I restart postgresql I get an error as the disk is full and the ...
1
vote
3
answers
5k
views
Debian & PostgreSQL - [ASSERT] Assertion failed for PostgreSQL Cluster 14
Right after booting Debian server I get this error:
[ASSERT] Assertion failed for PostgreSQL Cluster 14.
my PostgreSQL is active (I checked this by this command: systemctl status postgresql@14-main....
1
vote
1
answer
1k
views
How do I time how long my pg_restore takes in the command line?
I'm trying to track the amount of time the process takes for when I move around my data and upgrade my web app. From the command line, how would I track the amount of time elapsed from when the ...
1
vote
1
answer
6k
views
E: Unable to locate package postgresql-12
I'm using Linux Mint and I'm trying to upgrade PostgreSQL 10 to version 12 through sudo apt-get install postgresql-12, but I see this frequent error:
E: Unable to locate package postgresql-12
So what'...
1
vote
3
answers
2k
views
How to setup SSH user just to access postgres and do nothing else
I need to grant somebody read only access to a postgres sitting inside a ubuntu 18.04 server
For the postgres I did the following
CREATE ROLE read_only_user WITH LOGIN PASSWORD 'FAKEPASSWORD123' ...
1
vote
1
answer
41
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 ...
1
vote
2
answers
17k
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 ...
1
vote
1
answer
25k
views
Server Not accepting TCP/IP Connections
I have a Wt application running in a CentOS server machine(Machine A) in the port number 9798. Application is up and I could view the web page with the URL,
http://localhost:9798
But application is ...
1
vote
1
answer
1k
views
How to install postgresq 13 in Linux Mint 20.1
Following official instructions here https://www.postgresql.org/download/linux/debian/ but each time it still installs posgresql 12
1
vote
2
answers
379
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
1
answer
930
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.
1
vote
2
answers
1k
views
How do I specify which version of the PostgreSQL client (psql) to run?
Here's my situation: I have two versions of PostgreSQL installed on my CentOS system, and with the two versions come two different psql interactive terminals.
One is located at /usr/bin/psql, and ...
1
vote
1
answer
2k
views
Permission denied when starting PostgreSQL service using systemctl but works with postmaster
I previously installed PostgreSQL by following this documentation then I uninstalled it using the following commands (I'm on Fedora)
sudo rm -rf /var/lib/pgsql/
sudo dnf remove postgresql postgresql-...
1
vote
1
answer
504
views
Upgrade 2+ versions of PostgreSQL on Fedora
I have recently upgraded Fedora from 31 to 34 (31->33->34) using dnf. It mostly went smoothly, but I realised that PostgreSQL cannot access my data. Trying to run pg_upgrade, I got
Cannot ...
1
vote
1
answer
325
views
How to find out why postgres was started by systemd and prevent it?
I already checked the /proc/PID directory.
I'd like to prevent any services like postgres from starting except if I start them myself.
Hence, I'd like to find out why postgres was started. I saw that ...
1
vote
1
answer
2k
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 ...
1
vote
2
answers
1k
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
1
answer
112
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
1
answer
423
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, ...
1
vote
1
answer
295
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 ...
1
vote
1
answer
3k
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
vote
2
answers
8k
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 ...
1
vote
1
answer
746
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?
1
vote
2
answers
7k
views
No package pgadmin3 available
I'm running CentOS release 6.7 (Final)
I'm trying to install
sudo yum install pgadmin3
I keep getting
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
...
1
vote
2
answers
1k
views
File/directory not being deleted?
Please see the screenshot. The image on the left says existing x installation found at /opt/x
The image on the right shows the terminal where I attempt to delete the same directory.
The terminal on ...
1
vote
2
answers
4k
views
Centos 7 - Trying to install postgresql (from postgresql.org)
I am trying to install Socorro service on fresh Centos 7 (installed on Amazon ec2). I am following the instructions from the official documentation - Socorro. I installed the PostgreSQL 9.3 RPM ...
1
vote
2
answers
3k
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
1
answer
2k
views
Install postgresql 9.2 on debian wheezy (on virtualbox)
I have virtualbox with Debian Wheezy. I'm trying to install Postgresql 9.2 on it. When I trying do it by this instruction i have next:
Reading package lists... Done
Building dependency tree
Reading ...
1
vote
1
answer
146
views
Running sudo apt-gt update gives E: The repository 'https://apt.postgresql.org/pub/repos/apt virginia-pgdg Release' does not have a Release file
I am using Linux Mint Cinnamon 21.3 Virginia.
I installed PostgreSQL recently and the installation proceeded successfully. However, there seems to be some issue with the package manager now.
On ...
1
vote
2
answers
2k
views
"CREATE EXTENSION postgis" fails with 'could not access file "$libdir/postgis-3"'
# dnf list installed | grep postgresql
VRTSnbpostgresqlagent.x86_64 9.1.0.0-1620848511 @System
postgresql.x86_64 ...
1
vote
1
answer
693
views
Could not bind wireguard address when starting postgresql
I'm running wg-quick.service on system startup to establish a VPN tunnel:
root@db ~ # cat /usr/lib/systemd/system/[email protected]
[Unit]
Description=WireGuard via wg-quick(8) for %I
After=network-...
1
vote
1
answer
2k
views
psycopg2.OperationalError: could not connect to server: No route to host Is the server running on host "db" and accepting TCP/IP connections on port
Following the instructions here was fine on openSUSE Tumbleweed with Docker version 20.10.6-ce, build 8728dd246c3a
https://github.com/mirumee/saleor-platform#how-to-run-it
But on openSUSE Leap 15.3 ...
1
vote
1
answer
6k
views
libicui18n.so.69 missing PostgreSQL ArchLinux
Problem:
I tried to install PostgreSQL following the tutorial from the ArchWiki.
As the postgres user, when running the following command:
[postgres]$ initdb -D /var/lib/postgres/data
I get the ...
1
vote
1
answer
652
views
Postgres from script shell
Hi I'm trying to create a database with owner ! the owner by default is postgres and I want to change it when a user creates a database
read -p "Enter owner database name : " $owner
read -p &...
1
vote
1
answer
1k
views
coverting timestamp to epoch seconds and vice versa in PostgresSQL
I can run below queries to get the epoch seconds from date and can covert back them to given date in Google bigquery.
For example:
select unix_seconds(timestamp('2020-12-04 00:00:00')), unix_seconds(...
1
vote
1
answer
789
views
Spool/Capture output of COPY command in postgres/Redshift in shell script
I have shell script which will insert data into Redshift/Postgres database using psql command and i am using > for capturing script output. It captures everything but not how many rows inserted. ...
1
vote
1
answer
9k
views
Can't install postgresql ver. 11 client on RHEL7
My system on server is:
$ lsb_release -d
Description: Red Hat Enterprise Linux Server release 7.5 (Maipo)
Generally I have a Dockerized running postgres:11 database on this server and roughly ...
1
vote
1
answer
2k
views
can't get pgadmin4 to launch
I have Debian 10 with KDE plasma. I installed PGAdmin4 and when I try to open it I immediately get this error:
Fatal Error
Failed to open the system default web browser. Is one installed?.
I am new ...
1
vote
1
answer
2k
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 ...
1
vote
4
answers
4k
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
1
answer
534
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 ...
1
vote
1
answer
531
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/...
1
vote
1
answer
4k
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 ...
1
vote
1
answer
3k
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:...
1
vote
1
answer
2k
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 ...