]> granicus.if.org Git - postgresql/commitdiff
Be less detailed about reporting shared memory failure by avoiding the
authorBruce Momjian <bruce@momjian.us>
Sun, 27 Feb 2011 17:21:25 +0000 (12:21 -0500)
committerBruce Momjian <bruce@momjian.us>
Sun, 27 Feb 2011 17:21:58 +0000 (12:21 -0500)
output of actual Postgres parameter _values_ related to shared memory,
and suggesting that these are only possible parameters to reduce.

src/backend/port/sysv_shmem.c

index aece026ec649c057c40261f7668b447bf18273cf..aba6fa83ae9021004dd6c1165304b7cf173536e9 100644 (file)
@@ -153,25 +153,25 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
                  "segment exceeded your kernel's SHMMAX parameter.  You can either "
                                                 "reduce the request size or reconfigure the kernel with larger SHMMAX.  "
                                  "To reduce the request size (currently %lu bytes), reduce "
-                          "PostgreSQL's shared_buffers parameter (currently %d) and/or "
-                                                "its max_connections parameter (currently %d).\n"
+                                          "PostgreSQL's shared memory usage, perhaps by reducing shared_buffers"
+                                                "or max_connections.\n"
                                                 "If the request size is already small, it's possible that it is less than "
                                                 "your kernel's SHMMIN parameter, in which case raising the request size or "
                                                 "reconfiguring SHMMIN is called for.\n"
                "The PostgreSQL documentation contains more information about shared "
                                                 "memory configuration.",
-                                                (unsigned long) size, NBuffers, MaxBackends) : 0,
+                                                (unsigned long) size) : 0,
                                 (errno == ENOMEM) ?
                                 errhint("This error usually means that PostgreSQL's request for a shared "
                                   "memory segment exceeded available memory or swap space, "
                                                 "or exceeded your kernel's SHMALL parameter.  You can either "
                                                 "reduce the request size or reconfigure the kernel with larger SHMALL.  "
                                  "To reduce the request size (currently %lu bytes), reduce "
-                          "PostgreSQL's shared_buffers parameter (currently %d) and/or "
-                                                "its max_connections parameter (currently %d).\n"
+                                          "PostgreSQL's shared memory usage, perhaps by reducing shared_buffers"
+                                                "or max_connections.\n"
                "The PostgreSQL documentation contains more information about shared "
                                                 "memory configuration.",
-                                                (unsigned long) size, NBuffers, MaxBackends) : 0,
+                                                (unsigned long) size) : 0,
                                 (errno == ENOSPC) ?
                                 errhint("This error does *not* mean that you have run out of disk space. "
                                                 "It occurs either if all available shared memory IDs have been taken, "
@@ -179,11 +179,10 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
                  "or because the system's overall limit for shared memory has been "
                                 "reached.  If you cannot increase the shared memory limit, "
                  "reduce PostgreSQL's shared memory request (currently %lu bytes), "
-                       "by reducing its shared_buffers parameter (currently %d) and/or "
-                                                "its max_connections parameter (currently %d).\n"
+                                  "perhaps by reducing shared_buffers or max_connections.\n"
                "The PostgreSQL documentation contains more information about shared "
                                                 "memory configuration.",
-                                                (unsigned long) size, NBuffers, MaxBackends) : 0));
+                                                (unsigned long) size) : 0));
        }
 
        /* Register on-exit routine to delete the new segment */