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

Invent WALG_PREFETCH_DIR #905

Merged
merged 1 commit into from Mar 26, 2021
Merged

Invent WALG_PREFETCH_DIR #905

merged 1 commit into from Mar 26, 2021

Conversation

x4m
Copy link
Collaborator

@x4m x4m commented Mar 7, 2021

This will help to resolve issue #904

@CyberDem0n please take a look. Does it help with #904?

This will help to resolve issue wal-g#904
@CyberDem0n
Copy link
Contributor

Yes, it would be nice to have it, but we can do better than that.
During normal WAL replay postgres passing pg_wal/RECOVERYXLOG as the %p argument, but pg_rewind calls it with pg_wal/%f.
It already gives us enough information for disabling prefetch if WALG_PREFETCH_DIR is not set or if it known to be inside the PGDATA.

I ended up wrapping wal-g into a bash script that checks if %p ends with /%f and sets WALG_DOWNLOAD_CONCURRENCY to 1.

@x4m
Copy link
Collaborator Author

x4m commented Mar 9, 2021

Uhm....soooooo hacky...

@CyberDem0n
Copy link
Contributor

Uhm....soooooo hacky...

Yes, it is, but also it reducing chances of user error down to absolute zero.

@x4m x4m merged commit 9cb489a into wal-g:master Mar 26, 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.

None yet

3 participants