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
1
vote
1 answer

Call a Postgresql procedure with a ROWTYPE or RECORD literal

I'm building on a recipe book application. I'm only doing it to practice working in Postgresql: postgres=# select version(); version …
Mike
  • 522
  • 2
  • 14
1
vote
0 answers

Bad CTE performance since Postgres 12

I have the following query which uses a common table expression : with cte ( select gateway_id, parameters.id as parameter_id from gateways inner join capturing_devices on gateway_id = gateways.id inner join capturing_device_types…
rept
  • 2,086
  • 1
  • 26
  • 44
1
vote
1 answer

Postgresql Generated Column requires sum of multiple integer array columns

I have a table that has 2 integer columns and 2 integer array columns that keep scores in them. For example, my row would look like the follow: { physical_ed: 40, music: 90, first_term: {10,23,43}, second_term: {1,5,5,7} } The array fields are…
JESlabbert
  • 160
  • 2
  • 13
1
vote
2 answers

Postgres Password Authentication Failed

I am running a Postgres 12 database on Ubuntu 18.04 on WSL (Windows Subsystem for Linux). I can connect to the database with sudo -u postgres psql without any issues, and can view and create new databases and users. I created a new user with…
1
vote
0 answers

Postgres upgrade(10.9 to 12.2) is failing sporadically

Postgres upgrade(10.9 to 12.2) is failing sporadically We have upgraded postgres cluster from 10.5 to 12.2 10.5 version has also has extension lib PLV8. But we want to get rid of that extension in the upgraded version (12.2) Before upgrade, we have…
1
vote
0 answers

Having a run -time error installing postgresql 12?

I'm getting this error installing PostgreSQL 12: Error running C:\Users\guy\AppData\Local\Temp\postgresql_installer_b69647f9a1\getlocales.exe:child killed: unknown signal
Gwinyxt
  • 11
  • 1
1
vote
0 answers

Unable to install Postgresql server on Centos 8, using Ansible

I'm using Ansible to install Postgresql on my Centos 8 machine. This is the command that raises an error: - name: PostgreSQL | Install PostgreSQL | dnf dnf: name: "postgresql{{ postgresql_version_terse }}-server,postgresql{{…
Jacobian
  • 10,122
  • 29
  • 128
  • 221
1
vote
1 answer

filter emails and names and then de-duplicate in two columns using JSON on PostgreSQL 12

I have emails table that has sender and reporter columns. I want to search given parameter in those columns and return unique values. Let me explain with sample. This is my table and records: CREATE TABLE public.emails ( id bigint…
Dennis
  • 1,805
  • 3
  • 22
  • 41
1
vote
1 answer

Find unique values, count duplicates and rank them using WITH on PostgreSQL 12

I have 3 complex tables. For this question, I will simplify the usages. I need ranking, count (dupes) and unique records (result). It works with single table, however, when another WITH is included and INNER JOIN given, i do not get any records…
Dennis
  • 1,805
  • 3
  • 22
  • 41
1
vote
1 answer

How to create user in postresql version 12?

I have loged in postresql as default postgres user: psql -U postres and following the official documentation: https://www.postgresql.org/docs/12/app-createuser.html I have type this: create user -d -e --role=myrole -r -s myuser; and nothing…
wykopowiedz1
  • 103
  • 1
  • 8
1
vote
1 answer

Trying to build nominatim 3.4.1 I get "fatal error: postgres.h: No such file or directory"

I'm trying to install Nominatim 3.4.1 on Ubuntu 20.04 and PostgreSQL 12, so I'm following the official instructions from here, the issue is when I execute make, I have this error: [ 79%] Built target osm2pgsql_lib [ 79%] Built target osm2pgsql […
Emeeus
  • 5,072
  • 2
  • 25
  • 37
1
vote
1 answer

Recursive query slow on strange conditions

The following query is part of a much bigger one that runs perfectly fast on a filled DB but on a nearly empty one it is very long. In this simplified form, it takes ~400ms to execute but if you remove either line (1) or lines (2) and (3) then it…
1
vote
4 answers

How do I connect to database with postgresql version 12 using psql?

I want to connect to my newly created database called "test" in psql, I have seen a command like this: Connection \c[onnect] {[DBNAME|- USER|- HOST|- PORT|-] | conninfo} connect to new database (currently…
Yingqi
  • 985
  • 2
  • 13
  • 24
1
vote
1 answer

Attribute Conversion with Hibernate Spatial and PostGIS

In my PostgreSQL 12.2 + PostGIS 2.5.4, I have a table named Address with a column of type geography(POINT, 4326). I'm working with Hibernate Spatial and trying to develop an Attribute Converter to create the expected Point object from my…
1
vote
1 answer

Airflow scheduler fails to start tasks

My problem: Airflow scheduler is not assigning tasks. Background: I have Airflow running successfully on my local machine with sqlitedb. The sample dags as well as my custom DAGs ran without any issues. When I try to migrate from sqlite database to…