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
2 answers

PostgreSQL query is taking too long to execute on LINUX server

I have recently deployed PostgreSQL database to Linux server and one of the stored procedure is taking around 24 to 26 second to fetch the result. Previously i was deployed PostgreSQL database to windows server and the same stored procedure is…
Nayan Rudani
  • 1,029
  • 3
  • 12
  • 21
0
votes
1 answer

PostgreSQL: execute a stored function (getting an error even though the arguments have been casted)

I've run into a problem I couldn't find a solution to. I've successfully created a function. Here's the function name and arguments: CREATE OR REPLACE FUNCTION app_private.create_user(username citext, email text, email_is_verified boolean, name…
0
votes
0 answers

Cannot connect to the 5432 port postgres ubuntu

Well I am trying for hours to install and configure postgres in ubuntu but getting below error: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket…
Nabeel Ayub
  • 1,060
  • 3
  • 15
  • 35
0
votes
2 answers

PostGIS extension undefined symbol: GEOSCoordSeq_getXY

I am trying to create postgis 3.0 extension on postgresql12 on centos7 (both are installed using yum native rpms) yum install postgis30_12.x86_64 but i am getting different errors with GEOS. currently the error i am getting is postgres=# create…
0
votes
2 answers

Replacing postgresql.conf in a docker container

I am pulling the postgres:12.0-alpine docker image to build my database. My intention is to replace the postgresql.conf file in the container to reflect the changes I want (changing data directory, modify backup options etc). I am trying with the…
0
votes
0 answers

Remove indexes before insertions and then rollback indexes

I wanna create bulk. I have script: drop index idx_1; drop index idx_2; drop index idx_3; COPY games FROM '/usr/share/nginx/html/var/dumps/games#1000000.sql' DELIMITER ','; So, I wanna drop indexes, make insertions and then rollback my indexes. (I…
MegaBomber
  • 345
  • 2
  • 3
  • 11
0
votes
0 answers

copy fixed width file via psql to PostgreSQL table - Error: value too long for type character

I have a fixed width file from the U.S. Census. It's the one in the zip called "orgeo2010.sf1". The zip is a big file. I want to read that file into a table in PostgreSQL 12.1. This is how I built the table. create table census_2010.geo_header_sf1 …
John Polo
  • 547
  • 1
  • 8
  • 25
0
votes
1 answer

PostgreSQL-12.1 :: Streaming Replication Error

I have set up streaming replication on PostgreSQL 12.1 The master and slave are configured as below and WAL files are accumulating on the master. However, something is wrong as I get complaints that the WAL files are missing after a pg_restore on…
0
votes
2 answers

How do I fix a Postgres 12 Error: set-returning functions are not allowed in CASE

I just updated my Postres from 9.1 to 12 and I'm now getting this error message from a specific query: SQLSTATE[0A000]: Feature not supported: 7 ERROR: set-returning functions are not allowed in CASE LINE 17: generate_series(start_date, ^ HINT: You…
0
votes
1 answer

Issues with postgresql-12 partitioned table performance

It is working properly insert update delete copy etc work as planed But for some reason select is slow. This is partitioned table: /** TABLE PARTITIONING EVENT RECORD **/ -- CREATE PROPER SCHEMA CREATE SCHEMA IF NOT EXISTS test_par_pool; -- CREATE…
HMarx
  • 31
  • 2
  • 6
0
votes
1 answer

ERROR: could not write block 37583345 of temporary file: No space left on device

I want an output like this: obid | sid_count 1 | 3 2 | 2 3 | 4 The obid is on custdata table and sid_count is get from identifier table. The sample data is: custdata obid 1 2 3 identifier obid | type 1 | SID 1 |…
yusufmalikul
  • 508
  • 1
  • 9
  • 26
0
votes
1 answer

postgresql insert into select from json

Is it possible to insert into a table from a json dictionary in PostgreSQL without specifying the columns? Given there is a table books_1: CREATE TABLE books_1 ( data json ); INSERT INTO books VALUES ('{ "name": "Book the First", "author": "Bob…
svenema
  • 1,766
  • 2
  • 23
  • 45
0
votes
1 answer

Detection of an empty set in PLPGSQL FOR loop

Is there any way to detect that set returned by a query in Postgres is empty? Namely: FOR varname IN select testvar from foo LOOP END LOOP; -- Loop finished or Set was EMPTY IF NOT FOUND ????? THEN
Karlson
  • 2,958
  • 1
  • 21
  • 48
0
votes
3 answers

Accessing PostgreSQL on docker container from pgAdmin4 in another docker container

I have a PostgreSQL instance running on a docker with these commands: mkdir -p $HOME/vols/postgres docker pull postgres:12.0 docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker \ -v $HOME/vols/postgres:/var/lib/postgresql/data \ …
amiry jd
  • 27,021
  • 30
  • 116
  • 215
0
votes
2 answers

psql column name not exist when running through bash script

I'm trying to run several number of sql statement in bash script. I tried to run the following statement on psql, it works fine. However, when I run the exact statement on script, it says the column does not exist. The statement \copy (SELECT * FROM…
dee
  • 39
  • 1
  • 8
1 2 3
36
37