Skip to content

[PGPRO-5454] copying basedir to exclude the situation of overwriting … #424

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 1 commit into from
Aug 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static time_t stream_stop_begin = 0;
*/
typedef struct
{
const char *basedir;
char basedir[MAXPGPATH];
PGconn *conn;

/*
Expand Down Expand Up @@ -638,7 +638,7 @@ start_WAL_streaming(PGconn *backup_conn, char *stream_dst_path, ConnectionOption
//TODO Add a comment about this calculation
stream_stop_timeout = stream_stop_timeout + stream_stop_timeout * 0.1;

stream_thread_arg.basedir = stream_dst_path;
strncpy(stream_thread_arg.basedir, stream_dst_path, sizeof(stream_thread_arg.basedir));

/*
* Connect in replication mode to the server.
Expand Down