mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
[PostgreSQL 10] Fixed the Pause/Resume Replay of WAL files for PostgreSQL 10. Fixes #2566
This commit is contained in:
parent
822e62c238
commit
4eefc52748
@ -1090,17 +1090,21 @@ class ServerNode(PGChildNodeView):
|
||||
# Execute SQL to pause or resume WAL replay
|
||||
if conn.connected():
|
||||
if pause:
|
||||
status, res = conn.execute_scalar(
|
||||
"SELECT pg_xlog_replay_pause();"
|
||||
)
|
||||
sql = "SELECT pg_xlog_replay_pause();"
|
||||
if manager.version >= 100000:
|
||||
sql = "SELECT pg_wal_replay_pause();"
|
||||
|
||||
status, res = conn.execute_scalar(sql)
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
errormsg=str(res)
|
||||
)
|
||||
else:
|
||||
status, res = conn.execute_scalar(
|
||||
"SELECT pg_xlog_replay_resume();"
|
||||
)
|
||||
sql = "SELECT pg_xlog_replay_resume();"
|
||||
if manager.version >= 100000:
|
||||
sql = "SELECT pg_wal_replay_resume();"
|
||||
|
||||
status, res = conn.execute_scalar(sql)
|
||||
if not status:
|
||||
return internal_server_error(
|
||||
errormsg=str(res)
|
||||
|
Loading…
Reference in New Issue
Block a user