Questions tagged [postgresql]
All versions of PostgreSQL. Add an additional version-specific tag like [postgresql-13] if that context is relevant.
17,068
questions
0
votes
0
answers
28
views
Designing enrollment transfers
Here is a simplified asciigram of my database:
is_paid, paid_at
|
-----------Enrollments--------
/ \
| ...
0
votes
1
answer
26
views
How can I find or log inbound traffic connecting to a PostgreSQL database instance?
I have a postgres instance where I need to find out who/what is connecting. The installed version of postgres is 9.0.1. The instance sits on a linux box, SUSE I believe. Where could I look if it is ...
0
votes
0
answers
21
views
How to patch a Postgresql located on a Windows server? [duplicate]
I'm new to Postgresql administration and looking for some guidance on process to apply patch/upgrade to a PostgresSQL server installed on a Windows VM.
Is there a patch executable or do I need to ...
0
votes
1
answer
16
views
How to connect/take over a Postgresql instance without any login?
I have inherited a Postgresql server but have no records of the admin credentials or any user account.
I do have local admin access to the Windows VM that hosts this Postgresql server.
How can I gain ...
0
votes
1
answer
22
views
Is it possible to make a No-DELETE replica/follower database?
I would like to allow an application's database to execute DELETE statements. However, for analytics purposes, I would like to keep all data, even deleted data.
I'm trying to figure out if there is a ...
0
votes
1
answer
24
views
Performance Impact of Partial Index on INSERTs Not Involving the Partial Match
Given:
postgres=# create table testing(a int primary key, b int not null);
CREATE TABLE
postgres=# create index on testing (b) where b = 0;
CREATE INDEX
postgres=# \d testing
Table "...
0
votes
0
answers
19
views
Having trouble with composite data type in Postgres
I am trying to test an api call that loads data into my postgres db table via postman. The table includes composite value types, and that seems to be causing an error:{"error":"...
0
votes
2
answers
40
views
Postgres: is there a way to speed up changing column type from int4 to int8?
We have about 100 simple changes to make to our DB schema like this:
alter table transactions alter customer_sport_id type bigint;
Before it was int4. Most of the changed columns have one or more ...
0
votes
1
answer
22
views
Postgres trigger with after and on row appears to not run after writing to row
I have the following two tables:
CREATE TABLE qanda.group_questions (
id uuid DEFAULT gen_random_uuid() NOT NULL,
category_id uuid NULL,
business_model_id int4 NULL,
industry_id int4 ...
0
votes
0
answers
17
views
INSTEAD OF INSERT ON never gets triggered from continous aggregate (timescale)
I'm trying to make a trigger based on when a continuous aggregate is updated.
I had the trigger working on the source table, but when trying to add it on the aggregate:
CREATE TRIGGER ...
0
votes
0
answers
15
views
Postgres Barman archive command failed
For production environment, I am using this archive command in my postgresql server.
barman-wal-archive backup pg /var/lib/edb-pge/15/data/pg_wal/%f
Now when I manually run this command on my ...
0
votes
0
answers
18
views
postgresql (15) Python event_trigger
What's the syntax used to write a Postgresql event trigger in Python? This
CREATE OR REPLACE FUNCTION log_schema_changes()
RETURNS EVENT_TRIGGER
LANGUAGE plpython3u
AS $$
import plpy
plyp.warning(...
0
votes
1
answer
23
views
Adding FK to a newly attached partition slow
We have a partitioned table from which we attach and detach partitions for archiving purposes. When attempting to add a foreign key on the partitioned table, the process is taking a long time (up to ...
0
votes
0
answers
15
views
Change cipher PBEWithMD5AndDES
I am using PostgreSQL 14. I created a database, set up a user, and performed a migration.
Now, the database is connected to the application, and a security test was conducted.
I have been tasked with ...
0
votes
1
answer
39
views
Best database solution for high volume tables / data indexing (snapshots) [PostgreSQL]
My problem at the moment, is that I need to index/save snapshots of some data every x minutes, so every x minutes I am inserting around 500k new rows, into a table, which each one represents a ...