#203 update the cgen2 schema update script
Closed by mikem. Opened by ausil.
Unknown source master

Download 203.patch

In Fedora infrastructure we are using BDR to replicate the data, it
has some restrictions as listed:
https://wiki.postgresql.org/wiki/BDR_Command_Restrictions

The changes made give the same result but allow the schema updates
to meet the restrictions BDR imposes

Signed-off-by: Dennis Gilmore dennis@ausil.us

This is not enough. I will rework this to work with replicated databases and submit a new one in a bit.

This updated sql script does not give the same result
- it changes field names
- it drops a uniqueness constraint
- it adds incorrect foreign key constraints on image_archives
- it creates the table with oids
- the insert command references a nonexistent field

How prevalent is BDR? The original method was chosen for speed. The create+insert method is slower.

Also, we used CREATE..AS SELECT in the first cgen schema update

Corrections here: https://github.com/mikem23/koji-playground/commits/cgen2-schema

Though I'm still not sure if they belong upstream

@mikem it is not the most common setup. but I expect it will become more common, we should fix up the first cgen schema also

This is not enough. I will rework this to work with replicated databases and submit a new one in a bit.

@puiterwijk are you still planning to rework this, or did my updates (linked above) cover it? Wasn't sure what you meant. Are there other sql constructs in the script that are problematic?

^ NEEDINFO @puiterwijk

Ok, closing this for now. Feel free to reopen if you have updates.

Ok, closing this for now. Feel free to reopen if you have updates.

Pull-Request has been closed by mikem

Metadata