Thread: index leaks ?
Hello, I'm watching a strange beahviour by postgres, I wonder if it's a memory leak: Creating an index and destroying it makes the postgres process grow in size. This is what I do: create table test (a int); create index test_idx on test (a); drop index test_idx; create index test_idx on test (a); drop index test_idx; create index test_idx on test (a); drop index test_idx; ... The size growth is reported by 'top' in the fields SIZE, RSS and SHARE. The database is a newly created one after first initdb as of CVS 20040311. Can it be a memory leak in postgres code ? TIA --strk;
strk <strk@keybit.net> writes: > The size growth is reported by 'top' in the fields > SIZE, RSS and SHARE. > Can it be a memory leak in postgres code ? No, you are misinterpreting the 'top' output. You didn't say what platform you are on, but on some systems 'top' increases the reported size of a backend process each time that process touches a page of the shared memory area that it had not touched before. In this case you are simply watching the process use shared buffers it hadn't previously touched. regards, tom lane