Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TECH] ✨ Supprimer les vues postgres avant de les réinsérer #213

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

mickaelalibert
Copy link
Contributor

@mickaelalibert mickaelalibert commented Nov 16, 2023

🦄 Problème

Actuellement, si une vue créee n'est pas liée à une table supprimée de la BDD (ex: vue sur des tables "pg_"), elle n'est pas supprimée automatiquement à chaque réplication, et la restauration tente de la réinserer, provoquant un conflit

🤖 Solution

Supprimer uniquement les vues créées par l'utilisateur de réplication sur la BDD, et pas celles créées par les extensions etc ...

🌈 Remarques

On commence à avoir besoin de vue custom pour gérer le monitoring

💯 Pour tester

🟢
En RA, créer une vue dans la bdd source avec un pgsql-console, et lancer plusieurs fois la réplication :
run "npm run restart:full-replication"

Co-authored-by: Marie-Hélène Rots <[email protected]>
Co-authored-by: Yoan de Luca <[email protected]>
Copy link
Contributor

@yoandl yoandl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MCMPB

Copy link
Contributor

@machestla machestla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants