Doctorbal / zabbix-postgres-partitioning

Zabbix PostgreSQL version 11 Native Partitioning
MIT License
43 stars 15 forks source link

Extra scenario for Zabbix and DB migration/upgrade #2

Closed rouba002 closed 5 years ago

rouba002 commented 5 years ago

Hello

First thank you for the perfect document, it was a real help for me as I did not know the pg_partman till now.

I just played with the DB migration but also tried to solve a little bit broader scenario. Here is what I figured out, as an extra approach how to deal with the task. Since I have DB only for Zabbix I tried more dangerous way to migrate the data and not loose too much of the history.

This is an attempt to share it with you and well as with other users.

Doctorbal commented 5 years ago

@rouba002 , that is some excellent additions you have added! Thank you! I appreciate you also fixing the syntax error :-).

I will take your word for it from 3.4 to 4.2; I recently upgraded from 3.4 to 4.0 without a DB dump migration using pg_partman as the partitions extension seamlessly.

I do know that 4.2 offers timescaledb extension support which is very interesting but I have had very good experience with pg_partman.

What's the size of your Zabbix environment? Also how big was your Database during the migration?

rouba002 commented 5 years ago

Thx for accepting the PULL. It may need some cleanup or rework, maybe someone else will join ;)

Our enviroment is still growing, but during the migration it was ~300G, in production we are talking about the DB size of roughly 500Gb but this is mainly as I

Doctorbal commented 5 years ago

@rouba002 I cleaned up some of it and will continue to do so int he future.

I recently added the ansible role for this (in case you use ansible) which I found useful when testing this whole process.