Questions tagged as ['postgresql']

PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows.
Score: 0
dabadaba avatar
Is a value of 18446744073692774399 normal for kernel.shmmax?
cn flag

Context: web server hosted on DigitalOcean with a PostgreSQL database.

We were experiencing recurring database crashes for unknown reasons. Eventually I nailed down a faulty query that was overloading the system and am almost sure that's the issue.

However as I was investigating postgres crashes, I came across a post mentioning tweaking the system's kernel.shmmax because it's related to the postg ...

Score: 0
Rodrigo avatar
Disable disconnection logging on PostgresSQL
jp flag

I am seeing a LOT of Postgres disconnection events on the logs, is there some way to disable this specific log?

May 30 10:13:08 my-app app/postgres.456514 [SILVER] [11-1]  sql_error_code = 00000 time_ms = "2022-05-30 10:13:07.600 UTC" pid="1235859" proc_start_time="2022-05-30 10:13:07 UTC" session_id="629398b4.12db93" vtid="" tid="0" log_line="3" database="XXX" connection_source=" ...
Score: 0
BioRod avatar
cronjob does not stop postgres
es flag

I'm running Ubuntu 18.04 I'm using Postgres that came with apt.

I wrote a simple bash script to stop the database.

#!/bin/bash -x

/etc/init.d/postgresql stop

When running this script in a cronjob owned by root, it does not stop the database.

When I executed the script manually on the command line, it worked as expected. selinux is not enabled.

I then piped STDOUT to a file

59 11 * * * /etc/init ...
Score: 0
Munchkin avatar
Docker: error could not translate host name to address: Name or service not known in psql
et flag

We have the following Dockerfile:

FROM debian:stable-slim

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get full-upgrade -y && apt-get install -y --no-install-recommends \
    systemd \
    procps \
    apt-utils \
    build-essential \
    postgresql-server-dev-all \
    postgresql-plpython3-13 \
    pgxnclient \
    libc6-dev \
    wget \
    python3 \
    python3-pip \
Score: 0
Satish Lamak avatar
Not able to backup of postgres DB from DBeaver
jp flag

Hope you are doing great.

We have postgres install on centos server and accessing it through DBeaver from Ubuntu machine.

Whenever we try to take backup of Database it is giving error as "Native client is not specified for connection".

I did search and solution is like "which postgres-> and put result of it in it"

I am not sure about this, do we need to install psql client on ubuntu machine?

Ple ...

Score: 2
ZFS disk with Postgresql fragmenting quickly with write-heavy application
in flag

I am running a write-heavy application where I am storing my Postgresql on ZFS. Generally, it works well, but I am finding that my ZFS pool is fragmenting heavily. I even created a new ZFS pool and moved the data there using zfs send / recv, in order to defragment the full space and try out some new settings which might limit fragmentation, but to no avail.

I'm not sure what is going on. The appl ...

Score: 0
AWS Postgres database IP in security group, how to enter info to survive IP address changes?
cn flag

I have an existing prod Postgres database and I would like to replicate a table to a new Postgres database. In order to get the two to be able to talk to each other, I had to edit an AWS security group and add the public IP address of the new database since both databases are on a common VPC. While reading, I saw that the public IP of an RDS database can change. This would mean that the IP entered into  ...

Score: 0
Chrissl avatar
Getting could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 5432
us flag

I have Postgres 13 and pgAdmin installed on my Windows machine. It worked for like ~six month, until I hat do restart my machine. After restarting the computer (which I had not done because there was an update), I am trying to connect to Postgres via pgAdmin as always and I get this

could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and acce ...

Score: 0
Red Hat avatar
What happens if choose disable OID on tables?
je flag

When migration db from postgres 9 to 13 i have problem, latest releases not support OID, so, what is happen if choose disable OID on table properties?

Score: 0
Red Hat avatar
How to switch standby to master on postgresql 13?
je flag

For High Availability on DB was build Active-Standby(replica) cluster on Postgresql-13. Inserting data correctly transfer to 'replica' server, it is ok. Now, I want check case, how i can make change roles on two servers. for this I the /var/lib/postgresql/13/main/standby.signal was delete, also for apply changes restarted postgrsql.service Something tells me what I'm doing wrong. So,

  1. how to make a ma ...
Score: 1
RDS does not support creating a DB instance with the following combination
in flag

AWS recently notified me I need to upgrade an RDS instance that's using an instance type that's being removed.

So I logged in, and bumped up my instance size from m1.small to m5.large (the smallest they still have), clicked apply, and it gave me this error message:

RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.m5.large, Engine=postgres, EngineVersion=9. ...
Score: 0
mxcdh avatar
How to disable postgresql port for out-server connection?
br flag

I installed on my dedicated server ubuntu 20.04, docker, and container with postgressql. I have problem beacouse I want that ubuntu blocked all connection with postgressql, out-server from domain, ip server etc, which added to server.

At the moment I can connect with PostgreSQL:

  • via ssh
  • via server ip. ip.ip.ip:5432/...
  • via all domain which added to nginx like etc.

I want disabled conn ...

Score: 0
How setup wireguard + nixos to access servers (PostgreSQL, nginx) from workstation?
ma flag

I wanna give access to operators using wireguard to services like PostgreSQL, nginx, ssh, etc without giving the public IP of the host.

I use nixos, but a plain setup with wireguard + iptables can work for me.

The tunnel is established and packets are transferring, as shown (on the server):

❯ wg
interface: wg0
  public key: k4lOk+/rXONPolNI...
  private key: (hidden)
  listening port: 51820

pee ...
Score: 0
Are MySQL/MariaDB and Postgresql compatible?
cn flag

I want to install multiple applications on my web server. For most of them, using PostgreSQL is possible or the only option. But in one of them's installation guide, only MariaDB is mentioned. If I create a PostgreSQL database, will it work on the software that only talks about MariaDB too?

Score: 0
恋なつ avatar
I can't receive emails with Foxmail, but the email has been received locally
cn flag

Maillog doesn't show any errors. I see a new email in my /home/mail/domain/www3/new. I just can't read the email by using the client or telnet 110/143. Dovecot info The log doesn't seem to show any errors. I don't know what to do. Everything shows that there seems to be no problem. /etc/postfix/ have some configurations:

ssqueue_directory = /var/spool/postfix
command_directory = /usr/sbin
Score: 1
Taxel avatar
Pgadmin4 cannot start in Kubernetes
in flag

I have set up Postgres in Kubernetes (k3s administered with Rancher) which seems to be working fine but in order to take a look at the databases I tried to add a pgadmin4 pod.

I first tried adding the image dpage/pgadmin4 without any additional configuration (except for the a node port from port 80 and the PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD env var), got the error below and tried a few t ...

Score: 0
Eugene mtl avatar
pgcrypto and password hashing
tk flag

I'm thinking about my choices regarding how to store passwords in Postgres.

One such option is to use pgcrypto. Reading their docs, I see that their crypt and gen_salt functions do not use sha256 but instead use custom version of the cryptographically broken md5. Why would Postgres developers use such a hashing algorithm for their password storing module given that it's not secure?

I suppose I sho ...

Score: 0
user_0 avatar
Service in manual startup. What is starting it?
cn flag

I have Postgresql installed on a windows PC. On Windows 10.
Nothing depends from it:

Postgresql Service

It is in manual startup. But often I find it started. How can I find what is starting it?

Score: 0
matterhorner avatar
Bareos: Bscan doesn't recover database entries (Tapes from MySQL new server Postgres Database)
us flag

I had an ubuntu server 18.04 running with bareos and mysql database. Monthly I saved data on tapedrive and everything was working fine.

Unfortunately I had a servercrash without a backup of the dump of the database (I know.)

Now I set up an Ubuntu 20.04 with postgres database, since bareos is not supporting mysql anymore.

My idea was to Bscan my tapes to recover Jobs and to access my data on the tapes. ...

Score: 0
Express not fetching data from postgres database. No errors displayed
cn flag

This is a difficult question for me to ask because I'm not truly sure what the issue is.

I have an Express JS server for routing and Node Postgres (PG) for the pool.

When I either go directly to localhost or use POSTMAN to test the routes there is no response except a simple loading screen. With POSTMAN, it gets stuck like so:

POSTMAN sending request...

Or for localhost it simply stays buffering/loading ...

Score: 0
Postgres SSL server certificate upgrade / renew with openssl
ms flag

I have inherited a Company Postgres Server with SSL clients. Its around 100 users so far.

Two Problems: My Ca Cert (root.crt) expires next year and it seems to be still TlsV1.0. So an upgrade(renew) is urgently needed.

What I should avoid is making new client certificates for all users in one. It would become a nightmare for me :-)

So I searched for a solution where old and new Certificats will work, u ...

Score: 0
How to connect azure postgres with bastion?
kr flag

In this page also, it was shown to create a separate vm in the same vnet to connect to postgres setup in a private vnet option selected.

Is there anyway to connect using azure bastion.please show the steps.

Score: 1
Alexey Kholodkov avatar
Which directories to provide for pg_upgrade?
cn flag

I have docker container with postgres 12 and I want to upgrade it to 13. This image stores data and configs in /var/lib/postgresql/data dir:

  1. show data_directory; returns that directory
  2. postgresql.conf is stored in that directory

I tried to execute pg_upgrade with that directory (in old pg12 volume) as old data and config directory argument: docker run --name migrate13 -v pg12_volume postgres:13 su post ...

Score: 0
Andrew Harris avatar
Packet loss in PGSQL query leads to very long recovery time
za flag

We have a seemingly complex network issue that I have been struggling with for a while and wondered if anyone had any thoughts

We have a number of servers sitting in AWS London and another set of servers sitting in CoLos in London and Frankfurt

We connect from AWS to these CoLos using AWS DirectConnect

The AWS servers mainly connect to the CoLo servers using PGSQL, with the CoLo servers hosting the dat ...

Score: 0
Log Edge avatar
What is a real OTRS 6.0 community edition hardware requirements?
it flag

We have deployed OTRS 6.0 community edition on the VMware cloud. The configuration is as follows: 2 servers, an application server and a database server. Both on Ubuntu 20.4, Apache 2.4 Web server, mpm_prefork; PostgreSQL database 12.9. 24GB RAM on the application server, 4 GB on the database server. As recommended, we moved the articles from the database to the disk, placed the cache and sessions on th ...

Score: 0
Vanillaice avatar
How do I use the pgpass.conf file to allow promptless connection to a database
us flag

for testing purposes I have a postgres service/database running on my local computer. Right now I am using a batch file to change default userlogin, but I cannot use SET PGPASSWORD to pass along a password.

start cmd /k "chcp 1252 & SET PGUSER=postgres"

With this I just have to type 'psql' into my CMD without the -U postgres flag. As I understand PGPASSWORD was depreciated so the correct way  ...

Score: 1
Vanillaice avatar
Is it possible to open a file within a batch file as another user?
us flag

im trying to run psql.exe (postgreSQL) with an active code page set to 1252. I want to have a batch file that opens up a command prompt with that code page, then navigates to the psql directory to run it as "postgres" user. What I have is below:

start "test" cmd /k "chcp 1252 & cd c:\program files\postgresql\14\bin\psql.exe -U postgres"

how would I go about this? thanks!

Score: 0
Bazooka avatar
OpenStack: Too many Database idle Connections
us flag

I use PostgreSQL as a DB backend for all OpenStack Services on 3 Controllers. When all 3 controllers are started with no load, the number of connections are up to 700. And all of this conns are in idle mode.

Here are the Database parameters in Openstack service conf files:

max_overflow = 50
max_pool_size = 5
pool_timeout = 30
connection_recycle_time = 600

I have changed this parameter to smaller values,  ...

Score: 0
How can I make postgres startup on connection - and shutdown after a period of being out of use?
bd flag

In the day time I do software development where I use Postgres via Django on Ubuntu.

In the evening the computer is my personal laptop (still running Ubuntu).

How can I make Postgres startup when it receives a connection, and shut down if there is no activity for a while ?

I use systemd run services - so I imagine the startup part must be relatively straightforward ?

Score: 0
Sara June avatar
How to create azure postgres using terraform?
cn flag

Created VNet and two subnets first and pass the values as variables to terraform.

az group create -n TestingTFCLI -l CentralUS
az network vnet create -g TestingTFCLI -n myVNET --address-prefixes
az network nsg create -g TestingTFCLI -n MyNsg --tags super_secure no_80 no_22
az network vnet subnet create -n mySubNet -g TestingTFCLI --vnet-name myVNET --address-prefixes --netw ...