Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f1713078
Commit
f1713078
authored
Nov 28, 2005
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install a more future-proof fix for the snapshot-unset bug just found.
Per suggestion from Tom Lane.
parent
b79cb1ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
src/backend/postmaster/autovacuum.c
src/backend/postmaster/autovacuum.c
+7
-9
No files found.
src/backend/postmaster/autovacuum.c
View file @
f1713078
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.
7 2005/11/28 13:35:09
alvherre Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.
8 2005/11/28 17:23:11
alvherre Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -495,6 +495,9 @@ process_whole_db(void)
/* Start a transaction so our commands have one to play into. */
StartTransactionCommand
();
/* functions in indexes may want a snapshot set */
ActiveSnapshot
=
CopySnapshot
(
GetTransactionSnapshot
());
dbRel
=
heap_open
(
DatabaseRelationId
,
AccessShareLock
);
/* Must use a table scan, since there's no syscache for pg_database */
...
...
@@ -556,6 +559,9 @@ do_autovacuum(PgStat_StatDBEntry *dbentry)
/* Start a transaction so our commands have one to play into. */
StartTransactionCommand
();
/* functions in indexes may want a snapshot set */
ActiveSnapshot
=
CopySnapshot
(
GetTransactionSnapshot
());
/*
* StartTransactionCommand and CommitTransactionCommand will automatically
* switch to other contexts. We need this one to keep the list of
...
...
@@ -898,14 +904,6 @@ autovacuum_do_vac_analyze(List *relids, bool dovacuum, bool doanalyze,
vacstmt
->
relation
=
NULL
;
/* all tables, or not used if relids != NIL */
vacstmt
->
va_cols
=
NIL
;
/*
* Functions in indexes may want a snapshot set. Note we only need
* to do this in limited cases, because it'll be done in vacuum()
* otherwise.
*/
if
(
doanalyze
&&
!
dovacuum
&&
relids
!=
NIL
)
ActiveSnapshot
=
CopySnapshot
(
GetTransactionSnapshot
());
vacuum
(
vacstmt
,
relids
);
pfree
(
vacstmt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment