Skip to content

Catchup command implementation #392

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

Merged
merged 73 commits into from
Jun 21, 2021
Merged

Catchup command implementation #392

merged 73 commits into from
Jun 21, 2021

Conversation

kulaginm
Copy link
Member

@kulaginm kulaginm commented Jun 7, 2021

No description provided.

kulaginm and others added 30 commits February 1, 2021 17:20
…ce InstanceState * with simple directory string
@kulaginm kulaginm marked this pull request as ready for review June 10, 2021 22:14
creates an incremental copy for pages that have changed
since the destination database was shut down cleanly.
For this mode, the destination directory must contain a previous
copy of the database that was shut down cleanly.
Copy link
Contributor

Choose a reason for hiding this comment

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

copy of the database that was shut down cleanly.

А зачем именно cleanly ?

Copy link
Member Author

@kulaginm kulaginm Jun 15, 2021

Choose a reason for hiding this comment

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

Из изначальной постановки задачи в PGPRO-4447 и пункт 4 раздела Assumptions в issue #277

Copy link
Contributor

@gsmolk gsmolk Jun 15, 2021

Choose a reason for hiding this comment

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

Я считаю, что такое требование сильно уменьшает юзабельность и не дает никакого профита.

Copy link
Contributor

Choose a reason for hiding this comment

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

Т.е. мы таким образом защищаемся от того, чтобы нам не подсунили destination, который, например, только наполовину восстановлен из бэкапа, но по-моему игра не стоит свеч, проще защититься от этого документацией.

Copy link
Member Author

Choose a reason for hiding this comment

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

Это надо сделать в этой версии или оставим это ослабление требований на следующую версию?

Copy link
Contributor

@gsmolk gsmolk Jun 15, 2021

Choose a reason for hiding this comment

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

И, обрати внимание, мы ещё проверяем на наличие backup_label

Это хорошо, sanity чеков много не бывает. Но на 100% всё равно не защищает: вдруг pg_control успели донести, backup_label - нет.

Copy link
Member Author

@kulaginm kulaginm Jun 15, 2021

Choose a reason for hiding this comment

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

Так а какие проверки в таком случае будут нормальны/достаточны?
Пока то, о чём ты говоришь -- это просто выпилить одну проверку и один тест. Но уверенности в том, что в итоге будет получен работающий инстанс базы, будет меньше

Copy link
Contributor

Choose a reason for hiding this comment

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

Так а какие проверки в таком случае будут нормальны/достаточны?

Ну по логике вещей, все остальные имеющиеся минус эта =)

Но уверенности в том, что в итоге будет получен работающий инстанс базы, будет меньше

Я бы не сказал

Copy link
Member Author

Choose a reason for hiding this comment

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

И к тому же, сейчас комбинация двух проверок (на backup_label и на состояние pg_control) как раз защищает больше.
А вот если проверку pg_control выпилить, то как раз твой сценарий и не сможем поймать.

Copy link
Contributor

Choose a reason for hiding this comment

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

Мой сценарий (а так же много каких други) мы и так не поймаем, поэтому мы не сильно много проигрываем в плане надежности, но сильно выигрываем в юзабельности.

</listitem>
<listitem>
<para>
<literal>PTRACK</literal> — creates an incremental PTRACK backup tracking
Copy link
Contributor

Choose a reason for hiding this comment

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

Звучит как будто тут создается бэкап.
Должно же быть что-то вроде ".. read and copy pnly pages that changes since the point of divergence"

Copy link
Contributor

Choose a reason for hiding this comment

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

Такой текст пойдет?
PTRACK — tracking page changes on the fly,
only copies pages that have changed since the point of divergence
of the source and destination databases...

Copy link
Contributor

@gsmolk gsmolk Jun 20, 2021

Choose a reason for hiding this comment

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

Звучит норм!

Такой текст пойдет?
PTRACK — tracking page changes on the fly,
only copies pages that have changed since the point of divergence
of the source and destination databases...

Мне кажется, очень важно добавить, что и читаются тоже только изменившие страницы

@kulaginm kulaginm linked an issue Jun 15, 2021 that may be closed by this pull request
@kulaginm kulaginm self-assigned this Jun 18, 2021
Copy link
Contributor

@gsmolk gsmolk left a comment

Choose a reason for hiding this comment

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

Good enough for release candidate

<application>pg_probackup</application> can create a copy of a <productname>PostgreSQL</productname>
instance directly, without using the backup catalog. This allows you
to add a new standby server in a parallel mode or to have a standby
server that has fallen behind <quote>catch up</quote> with master.
Copy link
Contributor

Choose a reason for hiding this comment

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

@indrups
Мой рунглиш, конечно, могуч, но может такая формуливка будет звучать лучше ... or to have a fallen-behind standby server to catch with master ?

@gsmolk gsmolk merged commit 7de7284 into release_2_5 Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replica catchup
4 participants