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

What is the alternative of PL/Java for PostgreSQL 11 and 12?

Understand from: https://www.enterprisedb.com/edb-docs/d/edb-postgres-advanced-server/user-guides/user-guide/11/EDB_Postgres_Advanced_Server_Guide.1.80.html that PL/Java is deprecated in Advanced Server 11 and will be unavailable in server versions…
Jacky
  • 11
  • 1
  • 4
1
vote
2 answers

SQL / Postgresql count multiple columns with conditions

I have a simple table of the form: id gender a_feature (bool) b_feature (bool) ... xyz_feature (bool) and I want to sum over all feature columns dependent on…
1
vote
1 answer

PostgreSQL "duplicate key violation" with SEQUENCE

[Issue resolved. See Answer below.] I have just encountered a series of “duplicate key value violates unique constraint” errors with a system that has been working well for months. And I cannot determine why they occurred. Here is the…
Gurtz
  • 293
  • 1
  • 2
  • 16
1
vote
1 answer

How to query for a zero-byte char?

According to the documentation, pg_attribute.attgenerated is typed as char and has a value of "a zero byte" if the column is not generated, and there is at least one other possible value, with potentially more in the future. I want to query for all…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
1
vote
1 answer

Can you logically replicate a physical Postgres replica?

The title is pretty much self-explanatory. To illustrate more, here's a picture: [Live Database]-->(physical replication)-->[Physical Replica]-->(logical replication)-->[Logical Replica] So the question is whether this setup is achievable? All the…
Denis Arharov
  • 91
  • 1
  • 10
1
vote
2 answers

POSTGRES PROCEDURE with wildcard

I am trying to create a procedure with a wildcard with postgresql unfortunately I do not have any success. It looks like the postgresql versions have different ways of creating procedures, however, I find more help on SQL Server. Here the simple…
Herc01
  • 610
  • 1
  • 8
  • 17
1
vote
1 answer

Unusally large incremental backups with pbbackrest

I'm doing daily full backups of postgres database (v12.2) and hourly incremental backups with pgbackrest (v2.24) and crontab. After an out-of-disk hickup (and after an event where a lot of activity was going on in the DB) I started investigating the…
simonescu
  • 462
  • 5
  • 17
1
vote
1 answer

Why my newly created postgres RDS has constant write IOPS?

Why my newly created postgres RDS has constant read/write IOPS plus CPU utilization? I didn't use the rds in any of my app, nor does it open to public network. And I am just using the default param group.
1
vote
1 answer

docker and bitnami/phppgadmin: How to connect to the remote postgresql database

I am trying to connect to a remote postgresql database using the bitnami/phppgadmin docker How to mention the host name phppgadmin: image: "bitnami/phppgadmin:7.13.0" ports: - "8080:8080" - '443:8443' environment: …
Santhosh
  • 9,965
  • 20
  • 103
  • 243
1
vote
3 answers

How can I define a plpgsql function that accepts a parameter of a type that is not schema qualified and is not yet created

My database is structured with a schema per application user. In each schema there is an identical table named "entries" with the exact same DDL. I also have a common schema that hosts some functions that operate on those "entries" tables, and…
Paralife
  • 6,116
  • 8
  • 38
  • 64
1
vote
0 answers

Postgresql - How to force the gin index to take trigrams not based on the default collation of the database?

In the database, all tables were initially set to the wrong sort order: LC_COLLATE=C and LC_CTYPE = C. It turned out that the search for the player by nickname does not work for the Cyrillic alphabet. So I decided to change the sorting rules for a…
skipkolch
  • 11
  • 2
1
vote
1 answer

Why Select queries on partitioned tables take lock and get stuck

We designed a database so that it can accepts lots of data. For that we used partitioned table quite a lot (because the way we handle trafic information in database can take advantage of the partitionning system). to be more precise, we have table…
1
vote
2 answers

ERROR: syntax error at or near "PGDMP" LINE 1: PGDMP

I am trying to upload a postgres database backup file to my hosting server. But I am getting these errors. No idea what is wrong with this file.
Pashupati Sah
  • 426
  • 5
  • 9
1
vote
1 answer

ERROR: invalid logical replication message type "T"

I am getting below error from Postgres 10.3 logical replication. Setup In master, postgresql used 12.3 In logical, postgres 10.3 Logs 2021-03-22 13:06:57.332 IST @ 25929 LOG: checkpoints are occurring too frequently (22 seconds apart) 2021-03-22…
1
vote
1 answer

Oracle m5 hash returns different string than do Postgresql and bash md5sum(1)

Oracle 12c: SQL> select UTL_RAW.CAST_TO_RAW('Tom') as hex_val, 2 dbms_crypto.hash(src=>UTL_RAW.CAST_TO_RAW('Tom'), typ=>2) as hex_hash 3 from dual; 546F6D D9FFACA46D5990EC39501BCDF22EE7A1 Postgresql 12.5: sides=> select…
RonJohn
  • 349
  • 8
  • 20