Skip site navigation (1) Skip section navigation (2)

Re: PG 8.3 and large shared buffer settings

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Gerhard Wiesinger <lists(at)wiesinger(dot)com>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, Scott Carey <scott(at)richrelevance(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Dan Sugalski <dan(at)sidhe(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: PG 8.3 and large shared buffer settings
Date: 2009-09-26 18:59:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Sat, Sep 26, 2009 at 9:57 AM, Gerhard Wiesinger <lists(at)wiesinger(dot)com> wrote:
> On Sat, 26 Sep 2009, Greg Smith wrote:
>> On Fri, 25 Sep 2009, Jeff Janes wrote:
>>> Does it do this even if the block was already in shared_buffers?
>> Usually not.  The buffer ring algorithm is used to manage pages that are
>> read in specifically to satisfy a sequential scan (there's a slightly
>> different ring method used for VACUUM too).  If the buffer you need is
>> already available and not "pinned" (locked by someone else), it's not read
>> from disk again.  Instead, its usage count is incremently only if it's at
>> zero (this doesn't count as a use unless it's about to be evicted as
>> unused), and it's returned without being added to the ring.
> Hello Greg,
> What happens when a postmaster dies (e.g. core dump, kill -9, etc.). How is
> reference counting cleaned up and the lock removed?

If a backend dies in disgrace, the master detects this and the whole
cluster is taken down and brought back up.

WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back
the current transaction and exit, because another server process
exited abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and
repeat your command.

(The DETAIL is technically accurate, but somewhat misleading.  If the
crash to another backend happens while your backend is waiting on the
commit record WAL fsync to return, then while the postmaster may have
commanded your session to rollback, it is too late to actually do so
and when the server comes back up and finishes recovery, you will
probably find that your transaction has indeed committed, assuming you
have some way to accurately deduce this)


In response to

pgsql-performance by date

Next:From: Jeff JanesDate: 2009-09-26 19:16:52
Subject: Re: PG 8.3 and large shared buffer settings
Previous:From: Grzegorz JaśkiewiczDate: 2009-09-26 17:58:35
Subject: Re: Bad performance of SELECT ... where id IN (...)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group