+#if PG_VERSION_NUM >= 120000
+static int
+parse_vacuum_opt(VacuumStmt *vacstmt)
+{
+ int options = vacstmt->is_vacuumcmd ? VACOPT_VACUUM : VACOPT_ANALYZE;
+ ListCell *lc;
+
+ foreach(lc, vacstmt->options)
+ {
+ DefElem *opt = (DefElem *) lfirst(lc);
+
+ /* Parse common options for VACUUM and ANALYZE */
+ if (strcmp(opt->defname, "verbose") == 0)
+ options |= VACOPT_VERBOSE;
+ else if (strcmp(opt->defname, "skip_locked") == 0)
+ options |= VACOPT_SKIP_LOCKED;
+ else if (strcmp(opt->defname, "analyze") == 0)
+ options |= VACOPT_ANALYZE;
+ else if (strcmp(opt->defname, "freeze") == 0)
+ options |= VACOPT_FREEZE;
+ else if (strcmp(opt->defname, "full") == 0)
+ options |= VACOPT_FULL;
+ else if (strcmp(opt->defname, "disable_page_skipping") == 0)
+ options |= VACOPT_DISABLE_PAGE_SKIPPING;
+ }
+
+ return options;
+}
+#endif
+