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

Read pg_control file only when --check option is enabled in restore #126

Conversation

egashira-yusuke
Copy link

This is correction for #114, the second version patch based on discussion in #119 .
The target is PostgreSQL 11 and later.

In restore processing, pg_rman always had read the pg_control file from target database cluster.
However, if the database cluster had been deleted completely, pg_rman restore was failed because of calling get_controlfile().
The information of pg_control file in old database cluster is used only by --check option.
It is not necessarily required for database restore.

This patch modify to read pg_control file only when --check option is enabled in restore process.
Also, this introduce file existence check.
If --check option is specified and pg_control file is not found in restore process, pg_rman reports ERROR and interrupts processing.

MoonInsung and others added 2 commits October 18, 2019 10:50
In restore processing, pg_rman always had read the pg_control file from target database cluster.
However, if the database cluster had been deleted completely, pg_rman restore was failed because of calling get_controlfile().
The information of pg_control file in old database cluster is used only by --check option.
It is not necessarily required for database restore.

This patch modify to read pg_control file only when --check option is enabled in restore process.
Also, this introduce file existence check.
If --check option is specified and pg_control file is not found in restore process, pg_rman reports ERROR and interrupts processing.
@amitlan
Copy link
Contributor

amitlan commented Oct 24, 2019

Moon-san, Egashira-san,

This seems OK, thanks. I understand that this PR is meant as correction for already merged PR #119

Please push this change to the following branches: master, 12, 10, 9.6, 9.5, 9.4

Maybe you'll need to combine #119 and this PR when pushing to other branches, because #119 was only merged with 11.

@MoonInsung
Copy link
Contributor

MoonInsung commented Oct 24, 2019

Moon-san, Egashira-san,

This seems OK, thanks. I understand that this PR is meant as correction for already merged PR #119

Please push this change to the following branches: master, 12, 10, 9.6, 9.5, 9.4

Maybe you'll need to combine #119 and this PR when pushing to other branches, because #119 was only merged with 11.

Dear Amit.

Thank you!
I will merge it. And I will commit for each branches!

Best regards.
Moon.

@egashira-yusuke
Copy link
Author

Amit-san, Moon-san,

Thank you for reviewing and merging!

Please push this change to the following branches: master, 12, 10, 9.6, 9.5, 9.4

I think that it is not nessesary for 10, 9.6, 9.5 branches.
In 10, 9.6 and 9.5 branches, pg_rman seems not to use the value from pg_control for calculating WAL segment size in restore with --check.
So, I think this correction should be pushed to master and 12 branches.

@MoonInsung MoonInsung closed this Oct 24, 2019
@MoonInsung MoonInsung reopened this Oct 24, 2019
@MoonInsung
Copy link
Contributor

Amit-san, Moon-san,

Thank you for reviewing and merging!

Please push this change to the following branches: master, 12, 10, 9.6, 9.5, 9.4

I think that it is not nessesary for 10, 9.6, 9.5 branches.
In 10, 9.6 and 9.5 branches, pg_rman seems not to use the value from pg_control for calculating WAL segment size in restore with --check.
So, I think this correction should be pushed to master and 12 branches.

Dear egashira-yusuke-san.

I'm sorry. my mistake pressed the close button....
It is open again and I will do the merge soon.
And like your opinion, make sure to I will commit after investigating the each branchs where the actual merge needs to proceed.
Thank you!

Best regards.
Moon.

@MoonInsung MoonInsung merged commit 350a11d into ossc-db:REL_11_STABLE Oct 24, 2019
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.

3 participants