Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f8df3f

Browse files
committed
[Issue #90] minor changes
1 parent 9b5f9b8 commit 9f8df3f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/archive.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ push_wal_file(const char *from_path, const char *to_path, bool is_compress,
144144
int errno_temp;
145145
/* partial handling */
146146
struct stat st;
147-
int partial_file_timeout = 0;
147+
int partial_try_count = 0;
148148
int partial_file_size = 0;
149149
bool partial_file_exists = false;
150150

@@ -219,7 +219,7 @@ push_wal_file(const char *from_path, const char *to_path, bool is_compress,
219219
*/
220220
if (partial_file_exists)
221221
{
222-
while (partial_file_timeout < PARTIAL_WAL_TIMER)
222+
while (partial_try_count < PARTIAL_WAL_TIMER)
223223
{
224224

225225
if (fio_stat(to_path_temp, &st, false, FIO_BACKUP_HOST) < 0)
@@ -228,15 +228,15 @@ push_wal_file(const char *from_path, const char *to_path, bool is_compress,
228228
strerror(errno));
229229

230230
/* first round */
231-
if (!partial_file_timeout)
231+
if (!partial_try_count)
232232
partial_file_size = st.st_size;
233233

234234
/* file size is changing */
235235
if (st.st_size > partial_file_size)
236236
elog(ERROR, "Destination temporary WAL file \"%s\" is not stale", to_path_temp);
237237

238238
sleep(1);
239-
partial_file_timeout++;
239+
partial_try_count++;
240240
}
241241

242242
/* Partial segment is considered stale, so reuse it */

0 commit comments

Comments
 (0)