Skip to content

Commit 7a2987d

Browse files
Arushi-07copybara-github
authored andcommitted
Fix unmanaged_postgresql_sysbench_benchmark on C4a
PiperOrigin-RevId: 714267490
1 parent 69c21cc commit 7a2987d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

perfkitbenchmarker/linux_packages/postgresql16.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,25 @@ def YumInstall(vm):
115115
if vm.OS_TYPE not in os_types.AMAZONLINUX_TYPES:
116116
vm.RemoteCommand('sudo dnf config-manager --set-enabled crb')
117117
vm.RemoteCommand('sudo dnf install -y epel-release epel-next-release')
118+
if vm.is_aarch64:
119+
repo = 'EL-9-aarch64'
120+
else:
121+
repo = 'EL-9-x86_64'
118122
vm.RemoteCommand(
119123
'sudo yum install -y https://download.postgresql.org/pub/repos/yum/'
120-
'reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm --skip-broken'
124+
f'reporpms/{repo}/pgdg-redhat-repo-latest.noarch.rpm --skip-broken'
121125
)
122126
vm.RemoteCommand('sudo dnf -qy module disable postgresql')
123127
else:
124128
vm.RemoteCommand('sudo dnf update')
125129
vm.RemoteCommand(
126130
'sudo yum install -y postgresql16-server postgresql16'
127-
' postgresql16-contrib'
131+
' postgresql16-contrib postgresql16-devel'
128132
)
133+
vm.RemoteCommand(
134+
'echo "export PATH=/usr/pgsql-16/bin:$PATH" | sudo tee -a ~/.bashrc'
135+
)
136+
vm.RemoteCommand('pg_config --version')
129137

130138

131139
def AptInstall(vm):

perfkitbenchmarker/linux_packages/sysbench.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ def YumInstall(vm, args=immutabledict.immutabledict()):
140140
):
141141
if vm.OS_TYPE in os_types.AMAZONLINUX_TYPES:
142142
mariadb_pkg_name = ''
143-
elif vm.OS_TYPE in os_types.CENTOS_TYPES:
144-
devel_pkg_name = 'libpq-devel.x86_64'
145143
elif vm.OS_TYPE in os_types.AMAZONLINUX_TYPES:
146144
# Use mysql-devel according to sysbench documentation.
147145
mariadb_pkg_name = 'mysql-devel'

0 commit comments

Comments
 (0)