Content-Length: 259345 | pFad | http://github.com/postgrespro/postgres_cluster/commit/41db97399d6b5492cb4538680531f81f4711b0f4

03 Fix incorrect initialization of BackendActivityBuffer. · postgrespro/postgres_cluster@41db973 · GitHub
Skip to content

Commit 41db973

Browse files
committed
Fix incorrect initialization of BackendActivityBuffer.
Since commit c8e8b5a, this has been zeroed out using the wrong length. In practice the length would always be too small, leading to not zeroing the whole buffer rather than clobbering additional memory; and that's pretty harmless, both because shmem would likely start out as zeroes and because we'd reinitialize any given entry before use. Still, it's bogus, so fix it. Reported by Petru-Florin Mihancea (bug #15312) Discussion: https://postgr.es/m/153363913073.1303.6518849192351268091@wrigleys.postgresql.org
1 parent 03838b8 commit 41db973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/postmaster/pgstat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2695,7 +2695,7 @@ CreateSharedBackendStatus(void)
26952695

26962696
if (!found)
26972697
{
2698-
MemSet(BackendActivityBuffer, 0, size);
2698+
MemSet(BackendActivityBuffer, 0, BackendActivityBufferSize);
26992699

27002700
/* Initialize st_activity pointers. */
27012701
buffer = BackendActivityBuffer;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/41db97399d6b5492cb4538680531f81f4711b0f4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy