Closed stevendanna closed 8 months ago
Hi @stevendanna, please add branch-* labels to identify which branch(es) this GA-blocker affects.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
cc @cockroachdb/disaster-recovery
I started looking into this because I was curious about whether the name->ID rewriting here https://github.com/cockroachdb/cockroach/pull/115809 required additional restore support since we rewrite descriptor IDs. However, I don' think this PR can be the cause of this failure because it hasn't merged to 23.2 yet but I can reproduce the above on beta3.
Some printf debugging says the error is coming from:
I think the problem is that the rewrite code for functions all call parser.Parse(). I'm not familiar with the APIs here, but looking at other code that deals with functions, it looks like we likely want a switch that also knows how to call plpgsql.Parser: https://github.com/cockroachdb/cockroach/blob/830dad6b1da950bc47e05c1116c7f7c61994bbca/pkg/sql/catalog/rewrite/rewrite.go#L327
Describe the problem
On master (830dad6b1da950bc47e05c1116c7f7c61994bbca), we cannot seem to restore a database with a PLPGSQL function. I'm still investigating the root cause, but to reproduce:
I get:
I haven't yet investigated further, but am marking as a GA-blocker until I can.
Jira issue: CRDB-34638