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
70
votes
19 answers
Unable to connect to Postgres DB due to the authentication type 10 is not supported
I have recently tried my hands on Postgres. Installed it on local (PostgreSQL 13.0).
Created a maven project and used Spring Data JPA, works just fine. Whereas when I tried using Gradle project, I am not able to connect to the DB and keep getting…

Tushar Banne
- 1,587
- 4
- 20
- 38
30
votes
18 answers
pg Admin 4 - password for "postgres" user when trying to connect to PostgreSQL 13 server
I know that this question has been asked other times but I didn't find a solution to this problem!
I downloaded PostgreSQL 13 with pg Admin 4 and when I open it for the first time after installation it asks me for the master password that I was…

Masso
- 327
- 1
- 3
- 6
28
votes
4 answers
Postgres errors on ARM-based M1 Mac w/ Big Sur
Ever since I got a new ARM-based M1 MacBook Pro, I've been experiencing severe and consistent PostgreSQL issues (psql 13.1). Whether I use a Rails server or Foreman, I receive errors in both my browser and terminal like PG::InternalError: ERROR:…

Carl
- 401
- 1
- 8
- 12
18
votes
3 answers
Copying postgresql local to remote database (both with password) - ERROR: option "locale" not recognized
Working with Postgres 12 / Windows 10.
Trying to copy a remote database to localhost with the following command:
pg_dump -C -h remotehost -p 5432 -U postgres remotedb | psql -h localhost -p 5432 -U postgres localdb
CMD requests for password…

rodolfo_r
- 481
- 6
- 14
13
votes
3 answers
postgresql-client-13 : Depends: libpq5 (>= 13~beta2) but 12.3-1.pgdg18.04+1 is to be installed
I want to try new PostgreSQL and follow this instruction. But installation fails:
$ sudo apt install postgresql-client-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be…

Eugen Konkov
- 22,193
- 17
- 108
- 158
10
votes
11 answers
Getting top rows with the latest related row in joined table quickly
There are two tables conversations and messages, I want to fetch conversations along with the content of their latest message.
conversations - id(PRIMARY KEY), name, created_at
messages - id, content, created_at, conversation_id
Currently we are…

Rajdeep Singh
- 17,621
- 6
- 53
- 78
9
votes
0 answers
How to COPY into one PostgreSQL table in parallel without lock?
As I see in pg_stat_activiry, only one of COPY command executes at once. Other queries are in Lock state as I see in wait_event_type column.
How can I run several COPY mytable FROM STDIN in parallel without locking table?
ps. mytable is hypertable…

Nick
- 9,735
- 7
- 59
- 89
8
votes
3 answers
Getting Error: Unknown authenticationOk message typeMessage { name: 'authenticationOk', length: 23 }
I have installed Postgres 13 in windows 10.
Configured all the right credentials in the environment file of the project.
The project uses the below dependencies and it was created in ubuntu.
"pg": "^7.4.3",
"pg-hstore": "^2.3.2",
"sequelize":…

HV Sharma
- 4,891
- 3
- 15
- 30
7
votes
2 answers
postgres C:: Permission denied using windows
I am using Windows 10
I have a PostgreSQL file when I run inside the PSQL CMD
\i FILENAMEPATH
postgres=# \i C:\Users\Asus\Desktop\Projects\Movies\solution.sql
C:: Permission denied
I get that Permission Denied
C:: Permission denied
Is there a way…

Mohamed
- 425
- 4
- 14
7
votes
1 answer
How to call a stored procedure (not function) with INOUT parameter in PostgreSQL 13
I have this stored procedure :
CREATE OR REPLACE PROCEDURE SP_ObtenerSecuencialFactura(INOUT p_secuencial INT)
LANGUAGE PLPGSQL
AS
$$
BEGIN
SELECT MAX("CODIGOFACTURA") + 1 INTO p_secuencial FROM "FACTURA";
IF p_secuencial IS NULL THEN
…

Ejrr1085
- 975
- 2
- 16
- 29
6
votes
2 answers
How to list all indexes of a table with their corresponding size in PostgreSQL?
I can view the total size of all indexes in a table with
SELECT pg_size_pretty (pg_indexes_size('table_name'));
and the size of a specific index with:
select pg_size_pretty(pg_relation_size('index_name'));,
but I would like to retrieve a list with…

Z. M.
- 329
- 5
- 13
6
votes
2 answers
PostgreSQL downgrade password encryption from SCRAM to md5
I need to downgrade password encryption for user postgres from scram-sha-265 to md5.
I've tried modifying pg_hba.conf and postgresql.conf files changing password encryption from scram-sha-256 to md5 but after that I was unable to connect to the…

Daniele974
- 123
- 1
- 1
- 10
6
votes
1 answer
What is a restartpoint in postgresql?
In the postgresql.conf file for PostgreSQL version 13, the archive_cleanup_command comment explains the command in the following way:
#archive_cleanup_command = '' # command to execute at every restartpoint.
The documentation here and here…

theQuestionMan
- 1,270
- 2
- 18
- 29
5
votes
0 answers
Why does the PostgreSQL's Explain Analyze estimate the number of rows wrongly despite the correct stats?
Summary
I am joining a large table (~600K rows) with a smaller one (~11K rows) on a PostgreSQL database and I need to filter the result set by a descriptive text field.
When filtering by a bigint field of the smaller table the optimizer estimates…

milosla1
- 51
- 1
5
votes
2 answers
Why is pg_restore that slow and PostgreSQL almost not even using the CPU?
I just had to use pg_restore with a small dump of 30MB and it took in average 5 minutes! On my colleagues' computers, it is ultra fast, like a dozen of seconds. The difference between the two is the CPU usage: while for the others, the database uses…

eytienne
- 103
- 3
- 11