pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Ivan Voras <ivoras@freebsd.org>
Cc: pgsql-performance@postgresql.org, "lars" <lhofhansl@yahoo.com>
Subject: Re: UPDATEDs slowing SELECTs in a fully cached database
Date: Thu, 14 Jul 2011 11:47:00 -0400
Message-ID: <464.1310658420@sss.pgh.pa.us> (raw)
In-Reply-To: <4E1EB165020000250003F2FC@gw.wicourts.gov>
References: <4E16479D.3050605@yahoo.com>
	<4E1A0CBC.6090009@yahoo.com>
	<4E1A31AB.9010201@postnewspapers.com.au>
	<1310359653.80687.YahooMailRC@web121705.mail.ne1.yahoo.com>
	<4E1AEDAB020000250003F1C3@gw.wicourts.gov>
	<4E1B41EA.90104@yahoo.com>
	<4E1B05CC020000250003F1E6@gw.wicourts.gov>
	<CAHyXU0wPhZsQ_pMzfUWW0O=t_+2uwF-CJQNw-nuaxkjbi2zPEQ@mail.gmail.com>
	<4E1B810D.4070404@yahoo.com>
	<4E1B90AF.1020408@yahoo.com>
	<ivho9v$6dp$1@dough.gmane.org>
	<4E1C9A05.7060005@yahoo.com>
	<4E1C5563020000250003F252@gw.wicourts.gov>
	<4E1CA8E9.6090108@yahoo.com>
	<4E1CB56E.7080801@yahoo.com>
	<4E1D697C020000250003F29A@gw.wicourts.gov>
	<4E1D697C020000250003F29A@gw.wicourts.gov>
	<4752.1310570261@sss.pgh.pa.us>
	<4E1DCE81020000250003F2DC@gw.wicourts.gov>
	<4E1DCE81020000250003F2DC@gw.wicourts.gov>
	<11679.1310595677@sss.pgh.pa.us>
	<4E1EB165020000250003F2FC@gw.wicourts.gov>

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It seems like we ought to distinguish heap cleanup activities from
>> user-visible semantics (IOW, users shouldn't care if a HOT cleanup
>> has to be done over after restart, so if the transaction only
>> wrote such records there's no need to flush).  This'd require more
>> process-global state than we keep now, I'm afraid.
 
> That makes sense, and seems like the right long-term fix.  It seems
> like a boolean might do it; the trick would be setting it (or not)
> in all the right places.

The implementation I was imagining was to define another bit in the info
parameter for XLogInsert, say XLOG_NON_TRANSACTIONAL.  This could be a
high-order bit that would not go to disk.  Anytime it was *not* set,
XLogInsert would set a global boolean that would remember that the
current transaction wrote a transactional WAL record.  This is the
right default since the vast majority of call sites are writing records
that we would want to have flushed at commit.  There are just a couple
of places that would need to be changed to add this flag to their calls.

			regards, tom lane



view thread (57+ messages)  latest in thread

Message-ID: <464.1310658420@sss.pgh.pa.us>
Permalink:  ../464.1310658420@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/464.1310658420@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov, ivoras@freebsd.org, lhofhansl@yahoo.com
  Subject: Re: UPDATEDs slowing SELECTs in a fully cached database
  In-Reply-To: <464.1310658420@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox