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

recovery_1st_stage command failed if there are a lot of archived files #94

Open
yxdmarco opened this issue Feb 27, 2025 · 1 comment
Open
Assignees

Comments

@yxdmarco
Copy link

when i recover a standby node pg216(old primary) using pcp_recovery_node command, if there were too many archived log files in $ARCHIVEDIR,the command failed.

[root@pg216 ~]# pcp_recovery_node -h pgvip -p 9898 -U pgpool -n 0
Password:
ERROR: executing recovery, execution of command failed at "1st stage"
DETAIL: command:"recovery_1st_stage"

then i tried to remove these archived log files using rm command, it failed

[root@pg216 ~]# rm -f /data/archivedir/*
/bin/rm: cannot execute [Argument list too long]

then i removed these archived log file using find + rm commands, it succeeded.

[root@pg216 ~]#find /data/archivedir/ -name "0*" -exec rm -f {} ;

and then pcp_recovery_node command succeeded.

[root@pg216 ~]# ls /data/archivedir/
[root@pg216 ~]# pcp_recovery_node -h pgvip -p 9898 -U pgpool -n 0
Password:
pcp_recovery_node -- Command Successful

could the command that cleans archived log files can change from "rm -rf ${ARCHIVEDIR}/" to "find ${ARCHIVEDIR}/ -name "0" -exec rm -f {} ;" in recovery_1st_stage and follow_primary.sh ?

@pengbo0328
Copy link
Collaborator

Thank you for reporting this issue.
I will look into it.

@pengbo0328 pengbo0328 self-assigned this Feb 27, 2025
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

No branches or pull requests

2 participants