Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit285d8e1

Browse files
committed
Move vacuumlazy.c into access/heap.
It's heap table storage specific code that can't realistically begeneralized into table AM agnostic code.Author: Andres FreundDiscussion:https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
1 parent148e632 commit285d8e1

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

‎src/backend/access/heap/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ subdir = src/backend/access/heap
1212
top_builddir = ../../../..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
OBJS = heapam.o hio.o pruneheap.o rewriteheap.o syncscan.o tuptoaster.o visibilitymap.o
15+
OBJS = heapam.o hio.o pruneheap.o rewriteheap.o syncscan.o tuptoaster.o\
16+
vacuumlazy.o visibilitymap.o
1617

1718
include$(top_srcdir)/src/backend/common.mk

‎src/backend/commands/vacuumlazy.crenamed to‎src/backend/access/heap/vacuumlazy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
*
3030
* IDENTIFICATION
31-
* src/backend/commands/vacuumlazy.c
31+
* src/backend/access/heap/vacuumlazy.c
3232
*
3333
*-------------------------------------------------------------------------
3434
*/
@@ -178,7 +178,7 @@ static bool heap_page_is_all_visible(Relation rel, Buffer buf,
178178

179179

180180
/*
181-
*lazy_vacuum_rel() -- perform LAZY VACUUM for one heap relation
181+
*vacuum_heap_rel() -- perform VACUUM for one heap relation
182182
*
183183
*This routine vacuums a single heap, cleans out its indexes, and
184184
*updates its relpages and reltuples statistics.
@@ -187,7 +187,7 @@ static bool heap_page_is_all_visible(Relation rel, Buffer buf,
187187
*and locked the relation.
188188
*/
189189
void
190-
lazy_vacuum_rel(Relationonerel,intoptions,VacuumParams*params,
190+
heap_vacuum_rel(Relationonerel,intoptions,VacuumParams*params,
191191
BufferAccessStrategybstrategy)
192192
{
193193
LVRelStats*vacrelstats;

‎src/backend/commands/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ OBJS = amcmds.o aggregatecmds.o alter.o analyze.o async.o cluster.o comment.o \
2020
policy.o portalcmds.o prepare.o proclang.o publicationcmds.o\
2121
schemacmds.o seclabel.o sequence.o statscmds.o subscriptioncmds.o\
2222
tablecmds.o tablespace.o trigger.o tsearchcmds.o typecmds.o user.o\
23-
vacuum.ovacuumlazy.ovariable.o view.o
23+
vacuum.o variable.o view.o
2424

2525
include$(top_srcdir)/src/backend/common.mk

‎src/backend/commands/vacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,7 @@ vacuum_rel(Oid relid, RangeVar *relation, int options, VacuumParams *params)
17111711
cluster_rel(relid,InvalidOid,cluster_options);
17121712
}
17131713
else
1714-
lazy_vacuum_rel(onerel,options,params,vac_strategy);
1714+
heap_vacuum_rel(onerel,options,params,vac_strategy);
17151715

17161716
/* Roll back any GUC changes executed by index functions */
17171717
AtEOXact_GUC(false,save_nestlevel);

‎src/include/access/heapam.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,8 @@ extern BlockNumber ss_get_location(Relation rel, BlockNumber relnblocks);
186186
externvoidSyncScanShmemInit(void);
187187
externSizeSyncScanShmemSize(void);
188188

189+
/* in heap/vacuumlazy.c */
190+
structVacuumParams;
191+
externvoidheap_vacuum_rel(Relationonerel,intoptions,
192+
structVacuumParams*params,BufferAccessStrategybstrategy);
189193
#endif/* HEAPAM_H */

‎src/include/commands/vacuum.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ extern bool vacuum_is_relation_owner(Oid relid, Form_pg_class reltuple,
196196
externRelationvacuum_open_relation(Oidrelid,RangeVar*relation,
197197
VacuumParams*params,intoptions,LOCKMODElmode);
198198

199-
/* in commands/vacuumlazy.c */
200-
externvoidlazy_vacuum_rel(Relationonerel,intoptions,
201-
VacuumParams*params,BufferAccessStrategybstrategy);
202-
203199
/* in commands/analyze.c */
204200
externvoidanalyze_rel(Oidrelid,RangeVar*relation,intoptions,
205201
VacuumParams*params,List*va_cols,boolin_outer_xact,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp