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
8aaecaf8
Commit
8aaecaf8
authored
Mar 23, 2007
by
Alvaro Herrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We no longer need to palloc the VacuumStmt node; keeping it on the stack is
simpler.
parent
23a41573
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
src/backend/postmaster/autovacuum.c
src/backend/postmaster/autovacuum.c
+12
-16
No files found.
src/backend/postmaster/autovacuum.c
View file @
8aaecaf8
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.3
4 2007/03/13 00:33:41 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.3
5 2007/03/23 20:56:39 alvherre
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1237,32 +1237,28 @@ static void
...
@@ -1237,32 +1237,28 @@ static void
autovacuum_do_vac_analyze
(
Oid
relid
,
bool
dovacuum
,
bool
doanalyze
,
autovacuum_do_vac_analyze
(
Oid
relid
,
bool
dovacuum
,
bool
doanalyze
,
int
freeze_min_age
)
int
freeze_min_age
)
{
{
VacuumStmt
*
vacstmt
;
VacuumStmt
vacstmt
;
MemoryContext
old_cxt
;
MemoryContext
old_cxt
;
/*
/*
* The
node
must survive transaction boundaries, so make sure we create it
* The
list
must survive transaction boundaries, so make sure we create it
* in a long-lived context
* in a long-lived context
*/
*/
old_cxt
=
MemoryContextSwitchTo
(
AutovacMemCxt
);
old_cxt
=
MemoryContextSwitchTo
(
AutovacMemCxt
);
vacstmt
=
makeNode
(
VacuumStmt
);
/* Set up command parameters */
/* Set up command parameters */
vacstmt
->
vacuum
=
dovacuum
;
vacstmt
.
vacuum
=
dovacuum
;
vacstmt
->
full
=
false
;
vacstmt
.
full
=
false
;
vacstmt
->
analyze
=
doanalyze
;
vacstmt
.
analyze
=
doanalyze
;
vacstmt
->
freeze_min_age
=
freeze_min_age
;
vacstmt
.
freeze_min_age
=
freeze_min_age
;
vacstmt
->
verbose
=
false
;
vacstmt
.
verbose
=
false
;
vacstmt
->
relation
=
NULL
;
/* not used since we pass a relids list */
vacstmt
.
relation
=
NULL
;
/* not used since we pass a relids list */
vacstmt
->
va_cols
=
NIL
;
vacstmt
.
va_cols
=
NIL
;
/* Let pgstat know what we're doing */
/* Let pgstat know what we're doing */
autovac_report_activity
(
vacstmt
,
relid
);
autovac_report_activity
(
&
vacstmt
,
relid
);
vacuum
(
vacstmt
,
list_make1_oid
(
relid
),
true
);
pfree
(
vacstmt
);
vacuum
(
&
vacstmt
,
list_make1_oid
(
relid
),
true
);
MemoryContextSwitchTo
(
old_cxt
);
MemoryContextSwitchTo
(
old_cxt
);
}
}
...
...
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