structure.py
1018 Bytes
RE_PREFIX = r'([\d]*)-([\d]*)-([\d]*) ([\d]*):([\d]*):([\d]*).([\d]*) '\
r'([A-Z]*) .([\d]*). '
# 2022-01-03 07:04:42.728 WIB [1268975] LOG: started streaming WAL from
# primary at 3/B6000000 on timeline 1
RE_OK = RE_PREFIX + 'LOG: started streaming WAL'
# 2022-01-03 07:04:10.757 WIB [1258171] FATAL: terminating walreceiver due to
# timeout
RE_TIMEOUT = RE_PREFIX + 'FATAL: terminating walreceiver due to timeout'
# 2022-01-06 08:55:58.797 WIB [1983436] FATAL: could not connect to the
# primary server: connection to server at "10.8.18.1", port 5432 failed:
# Koneksi kehabisan waktu
RE_NO_ROUTE = RE_PREFIX + 'FATAL: could not connect to'
# 2022-01-03 07:27:16.064 WIB [22592] FATAL: could not receive data from WAL
# stream: ERROR: requested WAL segment 00000001000000A5000000A9 has already
# been removed
RE_REMOVED = RE_PREFIX + '(.*) removed'
# 2022-01-05 04:22:58.394 WIB [1237] LOG: invalid record length
RE_INVALID = RE_PREFIX + 'LOG: invalid'
RE_ANY = RE_PREFIX + 'FATAL: (.*)'