Could Not Read Block 1922 in File "Base

common postgresql errorsSometimes PostgreSQL users get errors and warnings and they are unable to understand why. To cater to these situations, this web log will cover some mutual errors and warnings in PostgreSQL. In some cases, information technology is a user setting problem or query error, but in other cases, it tin can be a PostgreSQL bug. But, it is quite rare to be a PostgreSQL bug, and therefore information technology is really important to differentiate between user error and PostgreSQL bug. Hither is a list of some common PostgreSQL errors, with symptoms and solutions.

1 – Is the PostgreSQL Server Running Locally and Accepting?

This usually occurs when the PostgreSQL server is not running, but in some cases, you can get a similar error even when the PostgreSQL server is still running. At that place are multiple ways to check whether the server is running or not, depending on the installation and operating organization. Here are some steps you can perform to check:

The condition of the PostgreSQL service shows information technology and all its subprocess processes are running. The second reason for the error could be the port number, as the default port of PostgreSQL is 5432. If PostgreSQL is configured to run on a unlike port, then the user needs to specify the port number (with some exceptions). Hither is the way to check the port number:

2 – Initdb Cannot Exist Run equally Root

The initdb command is used to initialize the PostgreSQL cluster. Sometimes people try to employ that by root, the user which tin cause the said error. It's very uncomplicated to switch the unprivileged user using u.s. and initdb the cluster. You cannot "initdb" using superuser, so change the user that owns the server process then do initdb. Or, you can use postgresql-12-setup to initialize the cluster.

iii – Initdb Failed Due to Directory 'Invalid Permission'

The directory should have permission u=rwx (0700) or u=rwx,thou=rx (0750) to perform initdb. Either you can initialize the cluster into another directory or alter the permission of the directory to u=rwx (0700) or u=rwx,g=rx (0750).

four – Object Permission

This error only happens when yous create some object using one user and another user does have access to that object.

5 – Out of Disk Space Error

PostgreSQL initializes its cluster into $PGDATA. It is very important to keep an eye on that directory and gratis up some space earlier that drive runs out of it. There are some ways to optimize the situation, like:

  • Complimentary some space on the disk
  • Point pg_wal to another deejay, and in that example, all walls will generate to another disk, and data is distributed among multiple disks.
  • Create a tablespace on another disk and create a tabular array in that tablespace. You tin split up your data betwixt multiple disks.

6 – Replication Standby Issue

You are replicating a server to some other which is not a copy of the original. You lot need to configure main replication and tabular array a base of operations backup using pg_basebackup and commencement the slave.

7 – The Server Terminated

This ane is a disquisitional error, and in that case, you need to identify the cause. If possible, generate the stack trace and consult your service provider.

eight – Out of Retentivity Upshot

Every system has a limited amount of memory. When there is no retention left, PostgreSQL's retention allocation functions start failing. Delight cheque your configuration and limitations of your hardware.

9 – OOM Killer

When there is non plenty memory left, the OOM killer invokes and kills the PostgreSQL process. Some people disable that process, but it is not recommended. Yous need to check the memory setting according to your hardware.

ten – Replication Archive Command Failure

This error appears when you have specified the destination directory for WAL in archive_command, which does not be. You need to create /usr/local/wal/ file or specify the directory which does be.


Our white paper "Why Choose PostgreSQL?" looks at the features and benefits of PostgreSQL and presents some applied usage examples. Nosotros too examine how PostgreSQL can be useful for companies looking to migrate from Oracle.

Download PDF

monteroyarstions.blogspot.com

Source: https://www.percona.com/blog/2020/06/05/10-common-postgresql-errors/

0 Response to "Could Not Read Block 1922 in File "Base"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel