Re: Deploy modifications of database objects

Поиск
Список
Период
Сортировка
От Dan Smith
Тема Re: Deploy modifications of database objects
Дата
Msg-id CAK50Jrzv2Xwy4E089xbWc0uBhhdR5zLJ3fXj0MvTN0wzBdXX+w@mail.gmail.com
обсуждение исходный текст
Ответ на Deploy modifications of database objects  (Mai Peng <maily.peng@webedia-group.com>)
Список pgsql-admin
Where ever possible, I would recommend you use a version control system (git) for DDL history and create a process to run migration / rollback scripts.  Setting up a QA / Staging system and some tests would also probably raise your confidence level in the code / performance.

If this is to support versioned API's, I would probably spend my time ensuring the abstraction was correct for functions (limited to doing just one thing) and that future changes were backwards compatible (seconding what Jayson said).  Adding features or refactoring generally shouldn't break the contract.

Assuming you wanted to have some beta users or feature flags in production, I would probably use a schema or obvious new object name prefix or suffix (probably with a date).  In this instance, I would probably lean toward the application using the correct object where necessary for feature flag (manage feature flag from one location where possible).  From there I would be diligent to clean up un-used versions when versions were made GA.


Best regards,

Dan Smith



On Tue, Jun 22, 2021, 06:00 Mai Peng <maily.peng@webedia-group.com> wrote:
Hello everyone,

We often deploy modified function code to production database. In order to impact the less users that still use the old version of these functions, we add another function. I think it’s not relevant.
How could we deploy these modifications ? Add a schema per version ?
Thank you in advance.
Mai

В списке pgsql-admin по дате отправления:

Предыдущее
От: Jayson Hreczuck
Дата:
Сообщение: Re: Deploy modifications of database objects
Следующее
От: Wells Oliver
Дата:
Сообщение: Optimizing materialize views for refresh