Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite752b15

Browse files
authored
Merge pull request#483 from japinli/master
Fix comparison unsigned expression
2 parentse101bfd +0ae30af commite752b15

File tree

5 files changed

+43
-17
lines changed

5 files changed

+43
-17
lines changed

‎packaging/pkg/scripts/rpm.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ ulimit -n 1024
2020

2121
if [${DISTRIB}='centos' ];then
2222
sed -i's|^baseurl=http://|baseurl=https://|g' /etc/yum.repos.d/*.repo
23+
if [${DISTRIB_VERSION}='8' ];then
24+
sed -i's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
25+
sed -i's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
26+
fi
2327
yum update -y
28+
if [${DISTRIB_VERSION}='8' ];then
29+
sed -i's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
30+
sed -i's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
31+
fi
2432
fi
2533

2634
# PACKAGES NEEDED

‎packaging/test/scripts/rpm.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ PG_TOG=$(echo $PG_VERSION | sed 's|\.||g')
1515

1616
if [${DISTRIB}!='rhel'-o${DISTRIB_VERSION}!='7' ];then
1717
# update of rpm package is broken in rhel-7 (26/12/2022)
18-
yum update -y
18+
#yum update -y
19+
if [${DISTRIB}='centos'-a${DISTRIB_VERSION}='8' ];then
20+
sed -i's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
21+
sed -i's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
22+
fi
23+
yum update -y
24+
if [${DISTRIB}='centos'-a${DISTRIB_VERSION}='8' ];then
25+
sed -i's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
26+
sed -i's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
27+
fi
1928
fi
2029
# yum upgrade -y || echo 'some packages in docker failed to upgrade'
2130
# yum install -y sudo

‎packaging/test/scripts/rpm_forks.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ PG_TOG=$(echo $PG_VERSION | sed 's|\.||g')
1515

1616
if [${DISTRIB}!='rhel'-o${DISTRIB_VERSION}!='7' ];then
1717
# update of rpm package is broken in rhel-7 (26/12/2022)
18+
if [${DISTRIB}='centos'-a${DISTRIB_VERSION}='8' ];then
19+
sed -i's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
20+
sed -i's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
21+
fi
1822
yum update -y
23+
if [${DISTRIB}='centos'-a${DISTRIB_VERSION}='8' ];then
24+
sed -i's|mirrorlist|#mirrorlist|g' /etc/yum.repos.d/CentOS-*.repo
25+
sed -i's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
26+
fi
1927
fi
2028

2129
if [${PBK_EDITION}=='ent' ];then
@@ -80,11 +88,13 @@ if [ $PBK_EDITION == 'std' ] ; then
8088

8189
# install POSTGRESQL
8290
# rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-${DISTRIB_VERSION}-x86_64/pgdg-redhat-repo-latest.noarch.rpm
83-
if [[${PG_VERSION}=='11' ]]|| [[${PG_VERSION}=='12' ]];then
84-
rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
85-
else
86-
rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
87-
fi
91+
#if [[ ${PG_VERSION} == '11' ]] || [[ ${PG_VERSION} == '12' ]]; then
92+
# rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
93+
#else
94+
# rpm -ivh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/postgrespro-std-${PG_VERSION}.${DISTRIB}.yum-${PG_VERSION}-0.3.noarch.rpm
95+
#fi
96+
curl -o pgpro-repo-add.sh https://repo.postgrespro.ru/pgpro-${PG_VERSION}/keys/pgpro-repo-add.sh
97+
sh pgpro-repo-add.sh
8898

8999
if [[${PG_VERSION}=='9.6' ]];then
90100
yum install -y postgrespro${PG_TOG}-server.x86_64

‎src/data.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2030,10 +2030,10 @@ get_page_header(FILE *in, const char *fullpath, BackupPageHeader* bph,
20302030
return false;/* EOF found */
20312031
elseif (read_len!=0&&feof(in))
20322032
elog(ERROR,
2033-
"Odd size page found at offset %lu of \"%s\"",
2033+
"Odd size page found at offset %ld of \"%s\"",
20342034
ftello(in),fullpath);
20352035
else
2036-
elog(ERROR,"Cannot read header at offset %lu of \"%s\": %s",
2036+
elog(ERROR,"Cannot read header at offset %ld of \"%s\": %s",
20372037
ftello(in),fullpath,strerror(errno));
20382038
}
20392039

@@ -2321,7 +2321,7 @@ copy_pages(const char *to_fullpath, const char *from_fullpath,
23212321
elog(ERROR,"Cannot seek to end of file position in destination file \"%s\": %s",
23222322
to_fullpath,strerror(errno));
23232323
{
2324-
size_tpos=ftell(out);
2324+
longpos=ftell(out);
23252325

23262326
if (pos<0)
23272327
elog(ERROR,"Cannot get position in destination file \"%s\": %s",

‎src/delete.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ do_delete(InstanceState *instanceState, time_t backup_id)
3636
parray*backup_list,
3737
*delete_list;
3838
pgBackup*target_backup=NULL;
39-
size_tsize_to_delete=0;
39+
int64size_to_delete=0;
4040
charsize_to_delete_pretty[20];
4141

4242
/* Get complete list of backups */
@@ -682,12 +682,11 @@ do_retention_wal(InstanceState *instanceState, bool dry_run)
682682
* at least one backup and no file should be removed.
683683
* Unless wal-depth is enabled.
684684
*/
685-
if ((tlinfo->closest_backup)&&instance_config.wal_depth<=0)
685+
if ((tlinfo->closest_backup)&&instance_config.wal_depth==0)
686686
continue;
687687

688688
/* WAL retention keeps this timeline from purge */
689-
if (instance_config.wal_depth >=0&&tlinfo->anchor_tli>0&&
690-
tlinfo->anchor_tli!=tlinfo->tli)
689+
if (tlinfo->anchor_tli>0&&tlinfo->anchor_tli!=tlinfo->tli)
691690
continue;
692691

693692
/*
@@ -701,7 +700,7 @@ do_retention_wal(InstanceState *instanceState, bool dry_run)
701700
*/
702701
if (tlinfo->oldest_backup)
703702
{
704-
if (instance_config.wal_depth >=0&&!(XLogRecPtrIsInvalid(tlinfo->anchor_lsn)))
703+
if (!(XLogRecPtrIsInvalid(tlinfo->anchor_lsn)))
705704
{
706705
delete_walfiles_in_tli(instanceState,tlinfo->anchor_lsn,
707706
tlinfo,instance_config.xlog_seg_size,dry_run);
@@ -714,7 +713,7 @@ do_retention_wal(InstanceState *instanceState, bool dry_run)
714713
}
715714
else
716715
{
717-
if (instance_config.wal_depth >=0&&!(XLogRecPtrIsInvalid(tlinfo->anchor_lsn)))
716+
if (!(XLogRecPtrIsInvalid(tlinfo->anchor_lsn)))
718717
delete_walfiles_in_tli(instanceState,tlinfo->anchor_lsn,
719718
tlinfo,instance_config.xlog_seg_size,dry_run);
720719
else
@@ -942,7 +941,7 @@ delete_walfiles_in_tli(InstanceState *instanceState, XLogRecPtr keep_lsn, timeli
942941
join_path_components(wal_fullpath,instanceState->instance_wal_subdir_path,wal_file->file.name);
943942

944943
/* save segment from purging */
945-
if (instance_config.wal_depth >=0&&wal_file->keep)
944+
if (wal_file->keep)
946945
{
947946
elog(VERBOSE,"Retain WAL segment \"%s\"",wal_fullpath);
948947
continue;
@@ -1027,7 +1026,7 @@ do_delete_status(InstanceState *instanceState, InstanceConfig *instance_config,
10271026
parray*backup_list,*delete_list;
10281027
constchar*pretty_status;
10291028
intn_deleted=0,n_found=0;
1030-
size_tsize_to_delete=0;
1029+
int64size_to_delete=0;
10311030
charsize_to_delete_pretty[20];
10321031
pgBackup*backup;
10331032

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp