OSDN Git Service

1. LocalBufferSync(): set nextFreeLocalBuf to 0 - we're freeing
authorVadim B. Mikheev <vadim4o@yahoo.com>
Tue, 20 May 1997 11:30:32 +0000 (11:30 +0000)
committerVadim B. Mikheev <vadim4o@yahoo.com>
Tue, 20 May 1997 11:30:32 +0000 (11:30 +0000)
commite7f7cf4a1c25178bf7df6f61d6908ffd22370ee2
tree1ad33daf148252d8eb9ac024e39ba9a58c8f3726
parent4a8c3dddc364c6098e3740a201627f4b544ca274
1. LocalBufferSync(): set nextFreeLocalBuf to 0 - we're freeing
   all local buffers @ xact commit, so accordingly nextFreeLocalBuf
   is first local buffer now.
   It helps to avoid unnecessary local buffer allocations in LocalBufferAlloc()
   latter ("memmory leaks" in 'order by').
2. ResetLocalBufferPool() lost allocated local buffers:

   memset(LocalBufferDescriptors, 0, sizeof(BufferDesc) * NLocBuffer);

   (local buffers leak @ xact aborts).
src/backend/storage/buffer/localbuf.c