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
aefb294e
Commit
aefb294e
authored
Oct 03, 1996
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added restriction to tables vacuum'able.
Added NOTICE messages for bad table names.
parent
487e9148
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+20
-1
No files found.
src/backend/commands/vacuum.c
View file @
aefb294e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.
2 1996/10/03 04:19:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.
3 1996/10/03 20:11:41
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -200,9 +200,11 @@ _vc_getrels(Portal p, NameData *VacRelP)
...
@@ -200,9 +200,11 @@ _vc_getrels(Portal p, NameData *VacRelP)
VRelList
vrl
,
cur
;
VRelList
vrl
,
cur
;
Datum
d
;
Datum
d
;
char
*
rname
;
char
*
rname
;
char
rkind
;
int16
smgrno
;
int16
smgrno
;
bool
n
;
bool
n
;
ScanKeyData
pgckey
;
ScanKeyData
pgckey
;
bool
found
=
false
;
StartTransactionCommand
();
StartTransactionCommand
();
...
@@ -225,6 +227,8 @@ _vc_getrels(Portal p, NameData *VacRelP)
...
@@ -225,6 +227,8 @@ _vc_getrels(Portal p, NameData *VacRelP)
while
(
HeapTupleIsValid
(
pgctup
=
heap_getnext
(
pgcscan
,
0
,
&
buf
)))
{
while
(
HeapTupleIsValid
(
pgctup
=
heap_getnext
(
pgcscan
,
0
,
&
buf
)))
{
found
=
true
;
/*
/*
* We have to be careful not to vacuum the archive (since it
* We have to be careful not to vacuum the archive (since it
* already contains vacuumed tuples), and not to vacuum
* already contains vacuumed tuples), and not to vacuum
...
@@ -252,6 +256,18 @@ _vc_getrels(Portal p, NameData *VacRelP)
...
@@ -252,6 +256,18 @@ _vc_getrels(Portal p, NameData *VacRelP)
continue
;
continue
;
}
}
d
=
(
Datum
)
heap_getattr
(
pgctup
,
buf
,
Anum_pg_class_relkind
,
pgcdesc
,
&
n
);
rkind
=
DatumGetChar
(
d
);
/* skip system relations */
if
(
rkind
!=
'r'
)
{
ReleaseBuffer
(
buf
);
elog
(
NOTICE
,
"Vacuum: can not process index and certain system tables"
);
continue
;
}
/* get a relation list entry for this guy */
/* get a relation list entry for this guy */
old
=
MemoryContextSwitchTo
((
MemoryContext
)
portalmem
);
old
=
MemoryContextSwitchTo
((
MemoryContext
)
portalmem
);
if
(
vrl
==
(
VRelList
)
NULL
)
{
if
(
vrl
==
(
VRelList
)
NULL
)
{
...
@@ -272,7 +288,10 @@ _vc_getrels(Portal p, NameData *VacRelP)
...
@@ -272,7 +288,10 @@ _vc_getrels(Portal p, NameData *VacRelP)
/* wei hates it if you forget to do this */
/* wei hates it if you forget to do this */
ReleaseBuffer
(
buf
);
ReleaseBuffer
(
buf
);
}
}
if
(
found
==
false
)
elog
(
NOTICE
,
"Vacuum: table not found"
);
heap_close
(
pgclass
);
heap_close
(
pgclass
);
heap_endscan
(
pgcscan
);
heap_endscan
(
pgcscan
);
...
...
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