@@ -206,7 +206,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
206206 */
207207lsn = & prev_backup -> start_lsn ;
208208elog (LOG ,_ ("backup only the page that there was of the update from LSN(%X/%08X).\n" ),
209- lsn -> xlogid , lsn -> xrecoff );
209+ ( uint32 ) ( * lsn >> 32 ), ( uint32 ) * lsn );
210210}
211211}
212212
@@ -265,7 +265,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
265265 * and append TABLESPACE to the list backup from non-snapshot.
266266 * TABLESPACE name and oid is obtained by inquiring of the database.
267267 */
268-
268+
269269reconnect ();
270270tblspc_res = execute ("SELECT spcname, oid FROM pg_tablespace WHERE "
271271"spcname NOT IN ('pg_default', 'pg_global') ORDER BY spcname ASC" ,0 ,NULL );
@@ -446,7 +446,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
446446/* create file list */
447447create_file_list (files ,pgdata ,NULL , false);
448448}
449-
449+
450450/* print summary of size of backup mode files */
451451for (i = 0 ;i < parray_num (files );i ++ )
452452{
@@ -518,7 +518,7 @@ do_backup_arclog(parray *backup_list)
518518current .read_arclog_bytes = 0 ;
519519
520520/* switch xlog if database is not backed up */
521- if (current .stop_lsn . xrecoff == 0 )
521+ if (( uint32 ) current .stop_lsn == 0 )
522522pg_switch_xlog (& current );
523523
524524/*
@@ -771,10 +771,8 @@ do_backup(pgBackupOption bkupopt)
771771/* initialize backup result */
772772current .status = BACKUP_STATUS_RUNNING ;
773773current .tli = 0 ;/* get from result of pg_start_backup() */
774- current .start_lsn .xlogid = 0 ;
775- current .start_lsn .xrecoff = 0 ;
776- current .stop_lsn .xlogid = 0 ;
777- current .stop_lsn .xrecoff = 0 ;
774+ current .start_lsn = 0 ;
775+ current .stop_lsn = 0 ;
778776current .start_time = time (NULL );
779777current .end_time = (time_t )0 ;
780778current .total_data_bytes = BYTES_INVALID ;
@@ -816,7 +814,7 @@ do_backup(pgBackupOption bkupopt)
816814/* backup serverlog */
817815files_srvlog = do_backup_srvlog (backup_list );
818816pgut_atexit_pop (backup_cleanup ,NULL );
819-
817+
820818/* update backup status to DONE */
821819current .end_time = time (NULL );
822820current .status = BACKUP_STATUS_DONE ;
@@ -1052,8 +1050,10 @@ wait_for_archive(pgBackup *backup, const char *sql)
10521050if (backup != NULL )
10531051{
10541052get_lsn (res ,& backup -> tli ,& backup -> stop_lsn );
1055- elog (LOG ,_ ("%s(): tli=%X lsn=%X/%08X" ),__FUNCTION__ ,backup -> tli ,
1056- backup -> stop_lsn .xlogid ,backup -> stop_lsn .xrecoff );
1053+ elog (LOG ,_ ("%s(): tli=%X lsn=%X/%08X" ),
1054+ __FUNCTION__ ,backup -> tli ,
1055+ (uint32 ) (backup -> stop_lsn >>32 ),
1056+ (uint32 )backup -> stop_lsn );
10571057}
10581058
10591059/* get filename from the result of pg_xlogfile_name_offset() */
@@ -1114,6 +1114,8 @@ static void
11141114get_lsn (PGresult * res ,TimeLineID * timeline ,XLogRecPtr * lsn )
11151115{
11161116uint32 off_upper ;
1117+ uint32 xlogid ;
1118+ uint32 xrecoff ;
11171119
11181120if (res == NULL || PQntuples (res )!= 1 || PQnfields (res )!= 2 )
11191121elog (ERROR_PG_COMMAND ,
@@ -1122,8 +1124,8 @@ get_lsn(PGresult *res, TimeLineID *timeline, XLogRecPtr *lsn)
11221124
11231125/* get TimeLineID, LSN from result of pg_stop_backup() */
11241126if (sscanf (PQgetvalue (res ,0 ,0 ),"%08X%08X%08X" ,
1125- timeline ,& lsn -> xlogid ,& off_upper )!= 3 ||
1126- sscanf (PQgetvalue (res ,0 ,1 ),"%u" ,& lsn -> xrecoff )!= 1 )
1127+ timeline ,& xlogid ,& off_upper )!= 3 ||
1128+ sscanf (PQgetvalue (res ,0 ,1 ),"%u" ,& xrecoff )!= 1 )
11271129{
11281130elog (ERROR_PG_COMMAND ,
11291131_ ("result of pg_xlogfile_name_offset() is invalid: %s" ),
@@ -1132,7 +1134,10 @@ get_lsn(PGresult *res, TimeLineID *timeline, XLogRecPtr *lsn)
11321134
11331135elog (LOG ,"%s():%s %s" ,
11341136__FUNCTION__ ,PQgetvalue (res ,0 ,0 ),PQgetvalue (res ,0 ,1 ));
1135- lsn -> xrecoff += off_upper <<24 ;
1137+ xrecoff += off_upper <<24 ;
1138+
1139+ /* Set LSN correctly */
1140+ * lsn = (XLogRecPtr ) (xlogid <<32 ) |xrecoff ;
11361141}
11371142
11381143/*