Questions tagged [postgresql-11]
PostgreSQL version 11
236 questions
0 votes
1 answer
108 views
PostgreSQL shared memory vs OS cache on Windows
We're running PostgreSQL v11.7 (upgrade is already planned) on Windows and seem to be hitting a rare dynamic shared memory bug #15749 which results in the error message: FATAL: cannot unpin a segment ...
0 votes
0 answers
89 views
Performance of queries decreased after upgrading from PostgeSQL 11 to 15
I updated the PostgreSQL server from version 11 to version 15 using pg_upgrade. There are several queries that have been affected after the update. Here is one of these queries, which took 15 seconds ...
0 votes
4 answers
148 views
What is the cause of this intermittent slow query when counting rows over a single indexed text column in PostgreSQL?
I have a table with 2,395,015 rows, where a TEXT column has one of three values and is never NULL. I have intermittent query performance issues when counting the number of rows where the value matches ...
0 votes
1 answer
106 views
Why does Postgres give different EXPLAIN ANALYZE results when using now() vs current_timestamp?
At my job we've recently had to optimize a query and kind of stumbled into the answer to make the query faster but can't explain why it worked and it's bothering me. The situation is something like ...
0 votes
2 answers
66 views
Need help identifying opportunities for improvement in table config and query design
I am working on a project with a fairly large data set. We require arbitrary aggregates on this dataset, these are generated at request time from a user. Here is a basic description of our current ...
0 votes
0 answers
363 views
PostgreSQL 14 is more than 2x slower than PostgreSQL 11
I have a Django web application that is backed by PostgreSQL 11 and I want to upgrade to PostgreSQL 14. But, when running PostgreSQL 14, the test suite runs more than 2x slower. I have compared both ...
0 votes
1 answer
199 views
Migrate columns from table A to table B, and update A with a reference to B
I have a table A with some columns that need to be migrated to a new table B. But I also need to create a column in table A to reference the id's from the new columns in the table B. I've tried doing ...
0 votes
1 answer
1k views
How I can merge 2 databases into a single one?
In a single server I have 2 Databases: db1 with schema public bd2 with schema public as well. What I want it to merge them into a single Database final_db where: schema db1.public will be final_db....
1 vote
0 answers
92 views
Query reads way more data on Postgres 13 than 11
I have two servers, one running Postgres 11, the other Postgres 13. Both servers have the same amount of RAM and CPU cores/speeds, and both are configured to these parameters. I have a query which on ...
0 votes
1 answer
231 views
Concat two jsonb/json fields yields error
Trying to concat two json text fields like so: SELECT app->>'id' || app->>'version' as foo FROM table, json_array_elements(applications::json) as app; Where applications is the data ...
0 votes
1 answer
3k views
PostgreSQL - select data from stored procedure
I working with creating new SP which will insert or do a select and return ID of the founded/inserted record. Parameter ID is inout parameter of stored procedure. I was helped with https://...
0 votes
0 answers
1k views
PostgreSQL Stored procedure for Insert or Update table
I previous years i was working a lot with MSSQL and oracle databases as admin and dev. Now i started to use PostgreSQL. From my opinion is a different dimension, and in the community is hard to find a ...
0 votes
1 answer
199 views
PostgreSQL 11.17 - backward unique index scan (DESC) is faster than ASC
I'm trying to figure out what the problem is with my Database. I am running PostgreSQL on Azure - "Azure Database for PostgreSQL single server". I run PostgreSQL 11.17. I have integrated ...
1 vote
1 answer
129 views
data archival postgres
I have this code to delete rows with column "id". I want to limit the number of rows deleted in each loop. This code deletes the first 25k rows and the next loop deletes nothing since its ...
0 votes
0 answers
2k views
PostgreSQL connection accepted without providing SSL certificates
Hopefully someone might be able to shed a light on this problem. I've configured two servers, both of them have the same problem. I've implemented SSL configuration, on PostgreSQL 11.18, I have ...