From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | huaxin zhang <uwcssa(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: purge hash table, how to? |
Date: | 2005-09-06 20:35:45 |
Message-ID: | 20303.1126038945@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
huaxin zhang <uwcssa(at)gmail(dot)com> writes:
> I want to purge all contents in the bufferpool,
Why do you think that's a good idea? It certainly won't purge the
kernel's disk caches, so if you're hoping to restore the system to
ground zero this won't do it.
> and I did this by
> calling "InitBufTable(256)" (buf_table.c) after each query.
Let's see ... I'd expect that to run out of shared memory pretty soon,
but not till after it's thoroughly corrupted your database ;-)
There is no API exported by bufmgr.c that does what you want. Something
like a combination of FlushRelationBuffers and DropRelFileNodeBuffers,
but processing a whole database (see also DropBuffers) or the whole buffer
cache, might work. You can't drop a buffer that some other process has
pinned, however.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | mark | 2005-09-06 20:38:11 | Re: uuid type for postgres |
Previous Message | Jonah H. Harris | 2005-09-06 20:32:06 | Re: uuid type for postgres |