You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by dj...@apache.org on 2026/10/14 11:36:08 UTC
(cloudberry) branch main updated: Remove redundant CheckTablespaceDirectory calls
This is an automated email from the ASF dual-hosted git repository.
tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new 3a586f12c2c Remove redundant CheckTablespaceDirectory calls
3a586f12c2c is described below
commit 3a586f12c2c2011989734be383ddea69aac24abb
Author: Jinbao Chen <ch...@gmail.com>
AuthorDate: Thu Oct 1 00:36:42 2026 -0400
Remove redundant CheckTablespaceDirectory calls
In pg16, the check for the tablespace directory has been moved to
CheckRecoveryConsistency to ensure that the check is only called
when xlog recovery is complete. Therefore, we need to remove the
other tablespace directory checks.
---
src/backend/access/transam/xlog.c | 48 -----------------------------
src/backend/utils/misc/guc_gp.c | 4 +--
src/test/regress/sql/disable_autovacuum.sql | 2 +-
3 files changed, 3 insertions(+), 51 deletions(-)
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 30354c35692..ca6537cae48 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6227,47 +6227,6 @@ StartupXLOG(void)
*shmCleanupBackends = true;
}
-/*
- * Verify that, in non-test mode, ./pg_tblspc doesn't contain any real
- * directories.
- *
- * Replay of database creation XLOG records for databases that were later
- * dropped can create fake directories in pg_tblspc. By the time consistency
- * is reached these directories should have been removed; here we verify
- * that this did indeed happen. This is to be called at the point where
- * consistent state is reached.
- *
- * allow_in_place_tablespaces turns the PANIC into a WARNING, which is
- * useful for testing purposes, and also allows for an escape hatch in case
- * things go south.
- */
-static void
-CheckTablespaceDirectory(void)
-{
- DIR *dir;
- struct dirent *de;
-
- dir = AllocateDir("pg_tblspc");
- while ((de = ReadDir(dir, "pg_tblspc")) != NULL)
- {
- char path[MAXPGPATH + 10];
-
- /* Skip entries of non-oid names */
- if (strspn(de->d_name, "0123456789") != strlen(de->d_name))
- continue;
-
- snprintf(path, sizeof(path), "pg_tblspc/%s", de->d_name);
-
- if (get_dirent_type(path, de, false, ERROR) != PGFILETYPE_LNK)
- ereport(allow_in_place_tablespaces ? WARNING : PANIC,
- (errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("unexpected directory entry \"%s\" found in %s",
- de->d_name, "pg_tblspc/"),
- errdetail("All directory entries in pg_tblspc/ should be symbolic links."),
- errhint("Remove those directories, or set allow_in_place_tablespaces to ON transiently to let recovery complete.")));
- }
-}
-
/*
* Checks if recovery has reached a consistent state. When consistency is
* reached and we have a valid starting standby snapshot, tell postmaster
@@ -6387,13 +6346,6 @@ PerformRecoveryXLogAction(void)
if (xlog_check_consistency_hook) {
xlog_check_consistency_hook();
}
- /*
- * Check that pg_tblspc doesn't contain any real directories. Replay
- * of Database/CREATE_* records may have created fictitious tablespace
- * directories that should have been removed by the time consistency
- * was reached.
- */
- CheckTablespaceDirectory();
RequestCheckpoint(CHECKPOINT_END_OF_RECOVERY |
CHECKPOINT_IMMEDIATE |
diff --git a/src/backend/utils/misc/guc_gp.c b/src/backend/utils/misc/guc_gp.c
index f376bc411a2..ea632817910 100644
--- a/src/backend/utils/misc/guc_gp.c
+++ b/src/backend/utils/misc/guc_gp.c
@@ -4075,7 +4075,7 @@ struct config_int ConfigureNamesInt_gp[] =
gettext_noop("Used by the fts-probe process."),
},
&gp_fts_probe_retries,
- 5, 0, 100,
+ 60, 0, 100,
NULL, NULL, NULL
},
@@ -4086,7 +4086,7 @@ struct config_int ConfigureNamesInt_gp[] =
GUC_UNIT_S
},
&gp_fts_probe_timeout,
- 20, 0, 3600,
+ 40, 0, 3600,
NULL, NULL, NULL
},
diff --git a/src/test/regress/sql/disable_autovacuum.sql b/src/test/regress/sql/disable_autovacuum.sql
index 41e99458531..20b1946c829 100644
--- a/src/test/regress/sql/disable_autovacuum.sql
+++ b/src/test/regress/sql/disable_autovacuum.sql
@@ -4,5 +4,5 @@ select gp_segment_id, pg_reload_conf() from gp_id union select gp_segment_id, pg
-- The reason for restarting cbdb here is that if the subsequent
-- vacuum ao test(uao*_catalog_tables/threshold) encounters an
-- unfinished transaction, it will fail.
---\!gpstop -ari
+\!gpstop -ari
-- end_ignore
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org