Re: PostgreSQL as a local in-memory cache

От: Brad Nicholson
Тема: Re: PostgreSQL as a local in-memory cache
Дата: ,
Msg-id: 1277908257.19899.67.camel@bnicholson-desktop
(см: обсуждение, исходный текст)
Ответ на: Re: PostgreSQL as a local in-memory cache  (Bruce Momjian)
Ответы: Re: PostgreSQL as a local in-memory cache  (Bruce Momjian)
Список: pgsql-performance

Скрыть дерево обсуждения

PostgreSQL as a local in-memory cache  ("", )
 Re: PostgreSQL as a local in-memory cache  ("", )
  Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
   Re: PostgreSQL as a local in-memory cache  ("Pierre C", )
   Re: PostgreSQL as a local in-memory cache  (Dimitri Fontaine, )
    Re: PostgreSQL as a local in-memory cache  (Tom Lane, )
     Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
      Re: PostgreSQL as a local in-memory cache  (Pavel Stehule, )
       Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
      Re: PostgreSQL as a local in-memory cache  (Robert Haas, )
       Re: PostgreSQL as a local in-memory cache  (Dave Page, )
        Re: PostgreSQL as a local in-memory cache  (Tom Lane, )
         Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
         Re: PostgreSQL as a local in-memory cache  (Dimitri Fontaine, )
       Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
     Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
      Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
       Re: PostgreSQL as a local in-memory cache  (Robert Haas, )
        Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
         Re: PostgreSQL as a local in-memory cache  ("Kevin Grittner", )
         Re: PostgreSQL as a local in-memory cache  (Robert Haas, )
          Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
           Re: PostgreSQL as a local in-memory cache  (Tom Lane, )
            Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
             Re: PostgreSQL as a local in-memory cache  (Jignesh Shah, )
              Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
               Re: PostgreSQL as a local in-memory cache  (Brad Nicholson, )
                Re: PostgreSQL as a local in-memory cache  (Bruce Momjian, )
               Re: PostgreSQL as a local in-memory cache  (Jignesh Shah, )
                Re: PostgreSQL as a local in-memory cache  (Greg Smith, )
    Re: PostgreSQL as a local in-memory cache  ("Pierre C", )
     Re: PostgreSQL as a local in-memory cache  (Matthew Wakeling, )
      Re: PostgreSQL as a local in-memory cache  ("Pierre C", )
       Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
        Re: PostgreSQL as a local in-memory cache  (Rob Wultsch, )
         Re: PostgreSQL as a local in-memory cache  (Robert Haas, )
          Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
           Re: PostgreSQL as a local in-memory cache  (Pavel Stehule, )
            Re: PostgreSQL as a local in-memory cache  ("Joshua D. Drake", )
             Re: PostgreSQL as a local in-memory cache  (Pavel Stehule, )
              Re: PostgreSQL as a local in-memory cache  ("A.M.", )
               Re: PostgreSQL as a local in-memory cache  (Pavel Stehule, )
            Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
             Re: PostgreSQL as a local in-memory cache  (Pavel Stehule, )
            Re: PostgreSQL as a local in-memory cache  ("Joshua D. Drake", )
      Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
    Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
     Re: PostgreSQL as a local in-memory cache  (Tom Lane, )
   Re: PostgreSQL as a local in-memory cache  (Greg Smith, )
   Re: PostgreSQL as a local in-memory cache  (Robert Haas, )
 Re: PostgreSQL as a local in-memory cache  (Dave Crooke, )
  Re: PostgreSQL as a local in-memory cache  (Craig James, )

On Tue, 2010-06-29 at 21:39 -0400, Bruce Momjian wrote:
> Jignesh Shah wrote:
> > On Tue, Jun 29, 2010 at 2:45 PM, Bruce Momjian <> wrote:
> > > Tom Lane wrote:
> > >> Bruce Momjian <> writes:
> > >> >>> I asked on IRC and was told it is true, and looking at the C code it
> > >> >>> looks true. ?What synchronous_commit = false does is to delay writing
> > >> >>> the wal buffers to disk and fsyncing them, not just fsync, which is
> > >> >>> where the commit loss due to db process crash comes from.
> > >>
> > >> >> Ah, I see. ?Thanks.
> > >>
> > >> > I am personally surprised it was designed that way; ?I thought we would
> > >> > just delay fsync.
> > >>
> > >> That would require writing and syncing to be separable actions. ?If
> > >> you're using O_SYNC or similar, they aren't.
> > >
> > > Ah, very good point. ?I have added a C comment to clarify why this is
> > > the current behavior; ?attached and applied.
> > >
> > > --
> > > ?Bruce Momjian ?<> ? ? ? ?http://momjian.us
> > > ?EnterpriseDB ? ? ? ? ? ? ? ? ? ? ? ? ? ? http://enterprisedb.com
> >
> >
> > Though has anybody seen a behaviour where synchronous_commit=off is
> > slower than synchronous_commit=on  ? Again there are two cases here
> > one with O_* flag and other with f*sync flags. But I had seen that
> > behavior with PostgreSQL 9.0 beta(2 I think) though havent really
> > investigated it much yet .. (though now I dont remember which
> > wal_sync_method flag) . Just curious if anybody has seen that
> > behavior..
>
> I have trouble believing how synchronous_commit=off could be slower than
> 'on'.
>

I wonder if it could be contention on wal buffers?

Say I've turned synchronous_commit off, I drive enough traffic fill up
my wal_buffers.  I assume that we would have to start writing buffers
down to disk before allocating to the new process.

--
Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.




В списке pgsql-performance по дате сообщения:

От: Ben Chobot
Дата:
Сообщение: Re: Architecting a database
От: Bruce Momjian
Дата:
Сообщение: Re: Analysis Function