diff --git a/stellar/operations.py b/stellar/operations.py
index d1394ea..e5ba60d 100644
--- a/stellar/operations.py
+++ b/stellar/operations.py
@@ -1,4 +1,5 @@
 import logging
+import re
 
 import sqlalchemy_utils
 
@@ -27,7 +28,7 @@ def get_engine_url(raw_conn, database):
 def _get_pid_column(raw_conn):
     # Some distros (e.g Debian) may inject their branding into server_version
     server_version = raw_conn.execute('SHOW server_version;').first()[0]
-    version_string, _, _ = server_version.partition(' ')
+    version_string = re.search('^(\d+\.\d+)', server_version).group(0)
     version = [int(x) for x in version_string.split('.')]
     return 'pid' if version >= [9, 2] else 'procpid'
 

ValueError: invalid literal for int() with base 10: '6beta1'
Related to following issue: #67 
I'm using Postgres 9.6beta1 on Linux.
The error happens when I try to take a snapshot.
diff --git a/tests/test_operations.py b/tests/test_operations.py
index 2f6d7d3..62b1e2e 100644
--- a/tests/test_operations.py
+++ b/tests/test_operations.py
@@ -21,7 +21,7 @@ class TestGetPidColumn(object):
         assert _get_pid_column(raw_conn) == 'procpid'
 
     @pytest.mark.parametrize('version', [
-        '9.2', '9.3', '10.0', '9.2.1', '10.1.1',
+        '9.2', '9.3', '10.0', '9.2.1', '9.6beta1', '10.1.1',
         '10.3 (Ubuntu 10.3-1.pgdg16.04+1)'
     ])
     def test_returns_pid_for_version_equal_or_newer_than_9_2(self, version):

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
click==8.1.8
exceptiongroup==1.2.2
greenlet==3.1.1
humanize==4.12.2
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
psutil==7.0.0
pytest==8.3.5
PyYAML==6.0.2
schema==0.7.7
SQLAlchemy==2.0.40
SQLAlchemy-Utils==0.41.2
-e git+https://github.com/fastmonkeys/stellar.git@79f0353563c35fa6ae46a2f00886ab1dd31c4492#egg=stellar
tomli==2.2.1
typing_extensions==4.13.0

name: stellar
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - click==8.1.8
      - exceptiongroup==1.2.2
      - greenlet==3.1.1
      - humanize==4.12.2
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - psutil==7.0.0
      - pytest==8.3.5
      - pyyaml==6.0.2
      - schema==0.7.7
      - sqlalchemy==2.0.40
      - sqlalchemy-utils==0.41.2
      - tomli==2.2.1
      - typing-extensions==4.13.0
prefix: /opt/conda/envs/stellar

tests/test_operations.py::TestGetPidColumn::test_returns_pid_for_version_equal_or_newer_than_9_2[9.6beta1]
tests/test_operations.py::TestGetPidColumn::test_returns_procpid_for_version_older_than_9_2[9.1] tests/test_operations.py::TestGetPidColumn::test_returns_procpid_for_version_older_than_9_2[8.9] tests/test_operations.py::TestGetPidColumn::test_returns_procpid_for_version_older_than_9_2[9.1.9] tests/test_operations.py::TestGetPidColumn::test_returns_procpid_for_version_older_than_9_2[8.9.9] tests/test_operations.py::TestGetPidColumn::test_returns_pid_for_version_equal_or_newer_than_9_2[9.2] tests/test_operations.py::TestGetPidColumn::test_returns_pid_for_version_equal_or_newer_than_9_2[9.3] tests/test_operations.py::TestGetPidColumn::test_returns_pid_for_version_equal_or_newer_than_9_2[10.0] tests/test_operations.py::TestGetPidColumn::test_returns_pid_for_version_equal_or_newer_than_9_2[9.2.1] tests/test_operations.py::TestGetPidColumn::test_returns_pid_for_version_equal_or_newer_than_9_2[10.1.1] tests/test_operations.py::TestGetPidColumn::test_returns_pid_for_version_equal_or_newer_than_9_2[10.3
stellar/operations.py
stellar/operations.py