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

comment out the time check from the code? #247

Open
bigplaice opened this issue Jan 11, 2023 · 0 comments
Open

comment out the time check from the code? #247

bigplaice opened this issue Jan 11, 2023 · 0 comments

Comments

@bigplaice
Copy link

Hi, pg_rman team,

I'm suffering a problem of backup failure, could you help me on this please?
My pg database is running on one server and pg_rman is running on another server.
pg_rman can access the "data" directory of database via NFS mount.

However, since the system time may be different on two servers, sometimes
the following error appears.

FATAL: cannot take a backup
DETAIL: There is a file with future timestamp from system time.
Current system time may be rewound.
HINT: The file is /map-to-pgdata/data/base/14432/1247.
If this is a database file, please retry with the full backup mode.
If this is a server log or archived WAL file, change the timestamp.

The related code is in backup.c->backup_files()
{
/* If current time is rewinded, abort this backup. */
if(tv.tv_sec < file->mtime)
ereport(FATAL,
(errcode(ERROR_SYSTEM),
errmsg("cannot take a backup"),
errdetail("There is a file with future timestamp from system time.\n"
"Current system time may be rewound."),
errhint("The file is %s.\n"
"If this is a database file, please retry with the full backup mode.\n"
"If this is a server log or archived WAL file, change the timestamp.",
file->path)));

}

In my scenario, it's hard to guarantee strict time sync between two servers.
So my question is, is it really necessary to check the time difference?
Is it possible to comment out the time check from the code?

Thank you very much!
Steven

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

1 participant