Questions tagged [postgresql-12]

For PostgreSQL questions specific to version 12.

PostgreSQL 12 is a major release of the PostgreSQL RDBMS.

Improvements include, but are not limited to:

  • performance improvements for partitioning and indexes
  • CTEs (WITH queries) are by default inlined for better query performance
  • JSON path queries per SQL/JSON specification
  • support for case- and accent-insensitive ICU collations
  • (stored) generated columns
  • extended statistics for “most common values”
  • page checksums can be enabled and disabled without initdb
  • authentication: support for encrypted GSSAPI authentication and LDAP server discovery
  • “pluggable storage” to add different table storage methods

More information regarding the release is available here.

554 questions
0
votes
0 answers

user 'postgres' doesn't exist

'postgres' user not created when i install postgreSQL 12 with EnterpriseDB, in installation process there is step in the beginning where you create superuser 'postgres' and give him password, but it's don't creates % sudo -u postgres psql psql:…
Marat Mag
  • 23
  • 1
  • 6
0
votes
1 answer

Multi-master replication with both snapshot and synchronization replication

We are setting up a Multi-Master replication setup using EDB Rep Server on Postgres. We are unable to create a Publication because some of the tables created by the Keycloak Application does not have Primary keys defined in them and Replication…
bjk7
  • 1
0
votes
1 answer

Deleting duplicate constraints from pg_constraint left database in broken state

I had an issue with my database where I accidentally had 1000s of duplicate fkey constraints. I managed to find them & deleted directly from pg_constraint (I think this is where I messed up but it's too late now). My data is all still there & the…
user3818491
  • 498
  • 1
  • 6
  • 16
0
votes
2 answers

Postgresql server keeps on changing the password

I have a postgres 12. I've set the password for user postgres as password and somehow after some time my application gets authentication failed for user "postgres". Then I login with psql and change the password with ALTER USER ... command. And then…
Dennis Gloss
  • 2,307
  • 4
  • 21
  • 27
0
votes
1 answer

Add column data to a table based on geometry intersection with another table - PostgreSQL

my city has defined some Urban Revitalization Perimeters using PostGIS I've separated the city Blocks within Perimeters and the Buildings within Perimeters. What I want to do now is to update the buildings table with two new columns, that relates…
Calil
  • 57
  • 2
  • 7
0
votes
1 answer

Search and match indexes in two different columns, return the sum of a third column - Postgresql

I have a table called "tax_info", this table stores the information of the land tax of my city, it goes like this: taxpayer_code | condominium_num | lot_area | …
Calil
  • 57
  • 2
  • 7
0
votes
0 answers

How to import .sql file in postgresql 12.2

I am using PostgreSQL 12.2, and I have some *.sql files to import into a database pg_restore -U postgres -d iotmaster -f D:\iotmaster.sql But I am facing this Error pg_restore: error: options -d/--dbname and -f/--file cannot be used together How…
Ram kumar
  • 19
  • 3
  • 9
0
votes
0 answers

Strange Behaviour with Order by Limit Postgres12

I have a query like: SELECT ed.Entity_Data_sur_id FROM ucc.Entity_Data ed WHERE ed.entity_id = 1 ORDER BY timestamp DESC which returns: entity_data_sur_id 10021351 10020351 10019351 10018351 10017351 10016351 10015351 but when adding limit…
0
votes
2 answers

Postgresql search if exists in nested jsonb

I'm new with jsonb request and i got a problem. Inside an 'Items' table, I have 'id' and 'data' jsonb. Here is what can look like a data: [ { "paramId": 3, "value": "dog" }, { "paramId": 4, "value": "cat" }, { …
Léal
  • 19
  • 5
0
votes
1 answer

Disable PostgreSQL query optimization?

I have come across the need to totally disable PostgreSQL query optimization just so that I can measure the effectiveness of applying QO (I want to see a before and after). I have come across this topic How to disable all optimizations of PostgreSQL…
Zeruno
  • 1,391
  • 2
  • 20
  • 39
0
votes
1 answer

Restoring PostgreSQL 11 backup to 12 hangs. How can I debug it?

I'm attempting to upgrade heroku PostgreSQL instances from pg11 to pg12 using the copy method as my testing environments are on hobby instances. At the end of the process it appears to be hanging for a long time (does not exit after >30 minutes for…
chooban
  • 9,018
  • 2
  • 20
  • 36
0
votes
2 answers

PostgreSQL benchmarking over a RAMdisk?

I have been considering the idea of moving to a RAMdisk for a while. I know its risks, but just wanted to do a little benchmark. I just had two questions: (a) when reading the query plan, will it still differentiate between disk and buffers hits? If…
Zeruno
  • 1,391
  • 2
  • 20
  • 39
0
votes
1 answer

PostgreSQL - How to update nested JSONB elements

I found some information, but some of it was not clearly explained or the examples were incomprehensible. This example was successfully executed on PostgreSQL 12. The requirement is to partially change a JSON structure with PostgreSQL. JSONB is used…
Ben Asmussen
  • 964
  • 11
  • 15
0
votes
1 answer

Postgresql JSON using WITH RECURSIVE

My json is [ { "id": null, "st": "value1", "key": 1, "value": "i am calling from", "description": null }, { "st": "value2", "key": 5, "value": "i am calling from", "description": null }, { "id":…
0
votes
1 answer

Preventing a possible PostgreSQL GUC parameter race condition?

Let's say I have two db clients executing queries against a PostgreSQL cluster in parallel. I decide that I want one of them to use max_parallel_workers_per_gather at 2 and the other at 6. So, client #1 will do exec("SET…