Skip to content

[YSQL] Unable to terminate the PostgreSQL backend #11343

Closed
@sushantrmishra

Description

Jira Link: DB-568

Description

YugabyteDB Query layer is built by reusing the QueryLayer of PostgreSQL. PostgreSQL has special logic for signal handling where PostgreSQL blocks the signals during critical sections e.g when performing the read and writes to the disk. This behavior is retained in YugabyteDB as well.

In YugabyteDB, the storage layer is built on top of rocksDB and runs as a separate process. So essentially In YugabyteDB, PostgreSQL backend process does not directly read/write from the disk so the PostgreSQL backends do not enter critical sections but still retain the same behavior from signal handling perspective. This causes the PostgreSQL backends to remain stuck and not get terminated.

This problem can show up as different stack traces and with different logs in PostgreSQL logs .

Currently we observe, two of the following scenario observed for stuck backends: ( As we collect more scenario's we will continue to add them).

  • PostgreSQL backends waiting on the response from docDB for read)
  • Create index (backfill RPC wait)

NOTE: This issue also causes the statement_timeout to be not honored

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions