This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 1387fae3b66 Remove the RLIMIT_CORE test for AvoidCorefileGeneration
1387fae3b66 is described below
commit 1387fae3b668464f8ef9a2b6c03337e1196de948
Author: Jinbao Chen <[email protected]>
AuthorDate: Fri Apr 3 01:32:41 2026 -0400
Remove the RLIMIT_CORE test for AvoidCorefileGeneration
---
src/backend/cdb/cdbutil.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/backend/cdb/cdbutil.c b/src/backend/cdb/cdbutil.c
index 1671b17223b..091fac79f60 100644
--- a/src/backend/cdb/cdbutil.c
+++ b/src/backend/cdb/cdbutil.c
@@ -28,6 +28,7 @@
#endif
#include <sys/param.h> /* for MAXHOSTNAMELEN */
+#include <sys/resource.h>
#include "access/genam.h"
#include "common/ip.h"
@@ -1936,8 +1937,9 @@ IsOnConflictUpdate(PlannedStmt *ps)
void
AvoidCorefileGeneration()
{
-#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE)
+#if defined(HAVE_GETRLIMIT)
struct rlimit lim;
+
getrlimit(RLIMIT_CORE, &lim);
lim.rlim_cur = 0;
if (setrlimit(RLIMIT_CORE, &lim) != 0)
@@ -4151,7 +4153,7 @@ IsOnConflictUpdate(PlannedStmt *ps)
void
AvoidCorefileGeneration()
{
-#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE)
+#if defined(HAVE_GETRLIMIT)
struct rlimit lim;
getrlimit(RLIMIT_CORE, &lim);
lim.rlim_cur = 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]