Skip to content

Commit 3b0ef95

Browse files
author
Alexander Korotkov
committed
Fix.
1 parent fe659b0 commit 3b0ef95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/pg_repack.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ const char *PROGRAM_VERSION = "unknown";
8484
" AND l.pid NOT IN (pg_backend_pid(), $1) " \
8585
" AND (l.virtualxid, l.virtualtransaction) <> ('1/1', '-1/0') " \
8686
" AND (a.application_name IS NULL OR a.application_name <> $2)" \
87+
" AND a.query !~* E'^\\\\s*vacuum\\\\s+' " \
88+
" AND a.query !~ E'^autovacuum: ' " \
8789
" AND ((d.datname IS NULL OR d.datname = current_database()) OR l.database = 0)"
8890

8991
#define SQL_XID_SNAPSHOT_90000 \
@@ -97,6 +99,8 @@ const char *PROGRAM_VERSION = "unknown";
9799
" AND l.pid NOT IN (pg_backend_pid(), $1) " \
98100
" AND (l.virtualxid, l.virtualtransaction) <> ('1/1', '-1/0') " \
99101
" AND (a.application_name IS NULL OR a.application_name <> $2)" \
102+
" AND a.query !~* E'^\\\\s*vacuum\\\\s+' " \
103+
" AND a.query !~ E'^autovacuum: ' " \
100104
" AND ((d.datname IS NULL OR d.datname = current_database()) OR l.database = 0)"
101105

102106
/* application_name is not available before 9.0. The last clause of
@@ -111,6 +115,8 @@ const char *PROGRAM_VERSION = "unknown";
111115
" ON a.datid = d.oid " \
112116
" WHERE l.locktype = 'virtualxid' AND l.pid NOT IN (pg_backend_pid(), $1)" \
113117
" AND (l.virtualxid, l.virtualtransaction) <> ('1/1', '-1/0') " \
118+
" AND a.query !~* E'^\\\\s*vacuum\\\\s+' " \
119+
" AND a.query !~ E'^autovacuum: ' " \
114120
" AND ((d.datname IS NULL OR d.datname = current_database()) OR l.database = 0)" \
115121
" AND ($2::text IS NOT NULL)"
116122

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy