Skip to content

[DocDB] build locator for tables where DocDB and PG catalog disagree on PG schema name #29003

@mdbridge

Description

@mdbridge

Jira Link: DB-18753

Description

We have cases where the DocDB PG schema name and the PG catalog schema name for a Postgres table diverge.

This can be due to a Postgres command changing the PG schema name a table belongs to. We do not currently update the DocDB PG schema name in this case so the PG catalog schema name will diverge from it.

This has caused a CE because xCluster will not set up correctly in this case because it is unable to connect the table on the source and destination universes by tablename, PG schema name. Worse, the xCluster failure message prints only one or possibly many affected tables.

This task is to figure out how to locate such tables; that is, if a future CE has this problem, how can we get a list of the tables with inconsistent PG schema names for fixing?

Ideally, here we would create a little script or command to print out a list of those tables. Then give the script to the support folks and post about it on #dst-dev.

Realistically, it might suffice to just figure out the essence of how to build such a script and add it to this issue. E.g., it's pretty easy to get the PG catalog schema names but no one knows offhand how to get the DocDB PG schema name. Similarly bring support and DST folks attention to the findings.

Note that as far as I can tell the ybadmin list_tables command gives you the PG catalog schema name, not the DocDB one.

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions