Use this tag to indicate that your question is about PostgreSQL version 13. Questions concerning database administration should go to https://dba.stackexchange.com/
Questions tagged [postgresql-13]
368 questions
0
votes
0 answers
Declaring a database name in a variable in SQL script for PostgreSQL
do you know any way to declare a database name in a variable?
I have tried many methods that I found on the Internet. I am looking for a simple script. I tried to do this in a DO block, but it doesn't work. I just need to declare a variable, set its…

MikeRej
- 1
- 2
0
votes
0 answers
Is refcursor working in postgresql 13.2 version?
IN my postgresql 13.2 version database, the "refcursor" is not working.
when am i storing the select query output to refcursor variable, it is throwing below error.
create function testing(val character varying)
return t_cur
language plpgsql
as…
0
votes
1 answer
Cent OS update to postgresql13-contrib-13.9 causes error postgres_fdw.so undefined symbol: get_rel_all_updated_cols
I am running CentOS 7.9 and the latest OS updates caused and issue when updating the library postgresql13-contrib-13.9-1.
After that update when attempting to create postgres_fdw or use an existing foreign server causes the error:
ERROR: could not…

Troy Meyerink
- 11
- 2
0
votes
1 answer
AWS replication failure - could not access file "pglogical"
After 2 months running without problems, my AWS DMS task failed with the following error:
Last failure message
Last Error Stream Component Fatal error. Task error notification received from subtask 0, thread 0 [reptask/replicationtask.c:2880]…

programistka
- 7
- 1
- 4
0
votes
0 answers
Aurora PostgreSQL -Poor Execution Plan
We have a Query which do left join with multiple tables using two columns and Index exist on it rather than doing Index scan, execution plan is choosing Table Scan on the table and to improve query performance tried running vacuum analyze on table…

Ranganath
- 17
- 7
0
votes
1 answer
Getting related many-to-one objects with a single query
I have three related tables in PostgreSQL:
objects - top-level table, that has an ID and a name.
object_events - a related table, that has a foreign key to objects
object_aux_data - a table that uses many-to-one relationship with object_event
Some…

Djent
- 2,877
- 10
- 41
- 66
0
votes
0 answers
Postgres bdr_init_physical command is in idle
I've installed, correctly Postgres13 with BDR. First node is configured correctly
create_node
-------------
661510928
(1 row)
create_node_group
-------------------
3209631483
(1 row)
wait_for_join_completion
--------------------------
…

Giulio
- 221
- 2
- 15
0
votes
0 answers
FATAL: the database system is in recovery mode
0
I am getting the below errors every 2 or 3 days(when high usage of database) and also postmaster.pid file is changed automatically. my Database version is postgresql 13
Could not get JDBC Connection; nested exception is…

Manoj
- 1
- 1
0
votes
0 answers
Cloud Functions (PHP, Python) hold onto idle connections to Cloud SQL despite max pool set to 1
My Cloud SQL instance is showing many more connections than I would expect:
I have a python cloud function that I've set the following properties for when connecting to the Postgres Cloud Sql instance:
connection = sqlalchemy.create_engine(
…

Christopher Lang
- 29
- 1
- 6
0
votes
1 answer
Postgresql - How to query nested array elements
I have JSON array data in PostgreSQL 13 table. I want to query this table to see all the nested array data in the output. I tried the below query, but it's not giving the expected output.
select
json_data::json -> 'Rows' -> 0 -> 'Values' ->> 0 as…

Vikas J
- 795
- 3
- 14
- 31
0
votes
0 answers
Postgresql - PANIC: could not open file "pg_replslot/slot_name/state": No such file or directory
Is there any way we could stop replication without logging into psql shell.
Disk-full situation lead to some corruption in PG files and keep on restarting.
2023-02-06 08:17:54 UTC [1] LOG: starting PostgreSQL 13.7 (Ubuntu 13.7-1.pgdg20.04+1) on…

Anto
- 3,128
- 1
- 20
- 20
0
votes
1 answer
How to enable writing option in replica server postgresql-13?
I have 2 DB servers: 10.1.1.49 - master and 10.1.1.68 - slave. First is prod and the second one is dev server respectively. I need to replicate data from prod server to dev server, also I need to able to write some data to dev server as well.
When I…
0
votes
1 answer
Undocumented in 13.9? ERROR: return type mismatch in function declared to return record Detail: final statement returns bigint instead of integer
The subject compilation error is no longer being thrown in 13.9. I couldn't find anything in the documentation stating that numeric data types are now getting automatically casted before they get returned. Can someone please confirm whether this is…
0
votes
0 answers
patroni.yml file configuration for psql HA mode
I m setting up an 3 node postgres HA setup with patroni and etcd for high availability. when I define data directory variable in patroni.yml file, same directory on all 3 nodes ( local path ) its working fine. but if i update different values for…

rishikanth
- 21
- 1
0
votes
0 answers
Postgresql - How to truncate table and insert rows in same table within a single transaction
I want to truncate a table in PostgreSQL 13 and then insert rows to the same table within a single transaction, so that when I execute the SQL command it will TRUNCATE the table and if during INSERTS anything fails truncated data should be…

Vikas J
- 795
- 3
- 14
- 31