Questions tagged as ['postgresql']
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 ...
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="34.220.26.230(5739 ...
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 ...
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 \
...
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 ...

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 ...

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 ...
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 ...
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?
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,
- how to make a ma ...

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. ...
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 domain1.com:5432 etc.
I want disabled conn ...

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 ...

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?
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/main.cf have some configurations:
ssqueue_directory = /var/spool/postfix
command_directory = /usr/sbin
...
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 ...
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 ...
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. ...

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:
Or for localhost it simply stays buffering/loading ...

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 ...

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.
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:
show data_directory;
returns that directorypostgresql.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 ...
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 ...
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 ...
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 ...
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!
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, ...

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 ?
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 10.0.0.0/8
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 10.240.0.0/16 --netw ...