diff --git a/configure.in b/configure.in
index 8ed09f5..44eff38 100644
--- a/configure.in
+++ b/configure.in
@@ -19,10 +19,10 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
 
 AC_INIT([PostgreSQL], [9.3devel], [pgsql-bugs@postgresql.org])
 
-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required.
-Untested combinations of 'autoconf' and PostgreSQL versions are not
-recommended.  You can remove the check from 'configure.in' but it is then
-your responsibility whether the result works or not.])])
+#m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required.
+#Untested combinations of 'autoconf' and PostgreSQL versions are not
+#recommended.  You can remove the check from 'configure.in' but it is then
+#your responsibility whether the result works or not.])])
 AC_COPYRIGHT([Copyright (c) 1996-2012, PostgreSQL Global Development Group])
 AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
 AC_CONFIG_AUX_DIR(config)
@@ -604,6 +604,17 @@ PGAC_ARG_BOOL(with, gssapi, no, [build with GSSAPI support],
 AC_MSG_RESULT([$with_gssapi])
 
 #
+# NUMA
+#
+AC_MSG_CHECKING([whether to build with NUMA support])
+PGAC_ARG_BOOL(with, numa, no, [build with NUMA support],
+[
+  AC_DEFINE(ENABLE_NUMA, 1, [Define to build with NUMA support. (--with-numa)])
+])
+AC_MSG_RESULT([$with_numa])
+AC_SUBST(with_numa)
+
+#
 # Kerberos 5
 #
 AC_MSG_CHECKING([whether to build with Kerberos 5 support])
@@ -922,6 +933,15 @@ if test "$with_gssapi" = yes ; then
   fi
 fi
 
+if test "$with_numa" = yes ; then
+  if test "$PORTNAME" != "win32"; then
+    AC_SEARCH_LIBS(set_mempolicy, [numa], [],
+		 		  [AC_MSG_ERROR([could not find function 'set_mempolicy' required for NUMA])])
+  else
+    LIBS="$LIBS -lnuma"
+  fi
+fi
+
 if test "$with_krb5" = yes ; then
   if test "$PORTNAME" != "win32"; then
      AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'], [],
diff --git a/src/backend/postmaster/fork_process.c b/src/backend/postmaster/fork_process.c
index 2a415e8..7997502 100644
--- a/src/backend/postmaster/fork_process.c
+++ b/src/backend/postmaster/fork_process.c
@@ -18,6 +18,10 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+#ifdef ENABLE_NUMA
+#include <numaif.h>
+#endif
+
 #ifndef WIN32
 /*
  * Wrapper for fork(). Return values are the same as those for fork():
@@ -124,6 +128,10 @@ fork_process(void)
 			}
 		}
 #endif   /* LINUX_OOM_ADJ */
+        
+#ifdef ENABLE_NUMA
+        set_mempolicy(MPOL_INTERLEAVE, NULL, 0);
+#endif
 	}
 
 	return result;
