Обсуждение: BUG #18159: Database Integrity Concerns: Missing FK Constraint

Поиск
Список
Период
Сортировка

BUG #18159: Database Integrity Concerns: Missing FK Constraint

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      18159
Logged by:          Root Cause
Email address:      rootcause000@gmail.com
PostgreSQL version: Unsupported/Unknown
Operating system:   Windows
Description:

Version - PostgreSQL 10.21, compiled by Visual C++ build 1800, 64-bit

We are currently experiencing issues in the database where foreign key (FK)
constraints are missing, leading to orphaned rows. Upon investigation, we
suspect that we are currently running a vacuum on tables according to a
schedule, and also as a standalone process when the product is not
running.

Is there a possibility that during the vacuum process, FK constraints might
be dropped and recreated for restructuring? If so, are there any chances
that they will not be recreated?


Re: BUG #18159: Database Integrity Concerns: Missing FK Constraint

От
Laurenz Albe
Дата:
On Mon, 2023-10-16 at 20:26 +0000, PG Bug reporting form wrote:
> Is there a possibility that during the vacuum process, FK constraints might
> be dropped and recreated for restructuring?

No, that cannot happen.

You must have lost your foreign key constraints some other way (somebody ran
ALTER TABLE).  There is no indication that this is a PostgreSQL bug.

Yours,
Laurenz Albe