diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index 5cf388f..52b9c1b 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -973,6 +973,10 @@ palloc_extended(Size size, int flags) errmsg("out of memory"), errdetail("Failed on request of size %zu.", size))); } + ereport(WARNING, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("out of memory"), + errdetail("Failed on request of size %zu.", size))); return NULL; } diff --git a/src/common/fe_memutils.c b/src/common/fe_memutils.c index 58c5c4c..0d44ef6 100644 --- a/src/common/fe_memutils.c +++ b/src/common/fe_memutils.c @@ -30,9 +30,9 @@ pg_malloc_internal(size_t size, int flags) tmp = malloc(size); if (tmp == NULL) { + fprintf(stderr, _("could not allocate %zu bytes of memory\n"), size); if ((flags & MCXT_ALLOC_NO_OOM) == 0) { - fprintf(stderr, _("out of memory\n")); exit(EXIT_FAILURE); } return NULL;