summaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorMichael Paquier2018-10-01 23:53:38 +0000
committerMichael Paquier2018-10-01 23:53:38 +0000
commite3a25ab9ea56ac540dc683cdf6f6a4b923bd22be (patch)
tree6874587914dfa46e9a4911302fe05dd52a99939b /src/include/commands
parentcf3dfea45b13662b3c23d7c481a9f77d67e77c45 (diff)
Refactor relation opening for VACUUM and ANALYZE
VACUUM and ANALYZE share similar logic when it comes to opening a relation to work on in terms of how the relation is opened, in which order locks are tried and how logs should be generated when something does not work as expected. This commit refactors things so as both use the same code path to handle the way a relation is opened, so as the integration of new options becomes easier. Author: Michael Paquier Reviewed-by: Nathan Bossart Discussion: https://postgr.es/m/20180927075152.GT1659@paquier.xyz
Diffstat (limited to 'src/include/commands')
-rw-r--r--src/include/commands/vacuum.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h
index 5af96fdc8a2..2f4303e40d8 100644
--- a/src/include/commands/vacuum.h
+++ b/src/include/commands/vacuum.h
@@ -188,6 +188,8 @@ extern void vac_update_datfrozenxid(void);
extern void vacuum_delay_point(void);
extern bool vacuum_is_relation_owner(Oid relid, Form_pg_class reltuple,
int options);
+extern Relation vacuum_open_relation(Oid relid, RangeVar *relation,
+ VacuumParams *params, int options, LOCKMODE lmode);
/* in commands/vacuumlazy.c */
extern void lazy_vacuum_rel(Relation onerel, int options,