pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexy Khrabrov <deliverable@gmail.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Greg Smith <gsmith@gregsmith.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: two memory-consuming postgres processes
Date: Fri, 2 May 2008 15:03:12 -0700
Message-ID: <C123A0EA-7B13-4297-9263-270224DF1F10@gmail.com> (raw)
In-Reply-To: <481B44AF.EE98.0025.0@wicourts.gov>
References: <A728C858-76CF-473F-917B-3C9EA4AA75CF@gmail.com>
	<dcc563d10805021230i5916561k3962a41e2afa894c@mail.gmail.com>
	<27A4D379-2553-496D-A96C-102F2A5E62C2@gmail.com>
	<dcc563d10805021253n1589baa7u559fdfc8053d23d3@mail.gmail.com>
	<21403.1209759217@sss.pgh.pa.us>
	<72E02D29-848B-467A-AE6B-401568010254@gmail.com>
	<dcc563d10805021340u274ff4fegcf8902f66118d7c1@mail.gmail.com>
	<481B8160.2090106@emolecules.com>
	<C25E5DBA-B649-4483-B1A2-2A881522B891@gmail.com>
	<Pine.GSO.4.64.0805021714580.2455@westnet.com>
	<1F7A4C3D-C8A3-44BC-A324-E9BA409BB479@gmail.com>
	<481B44AF.EE98.0025.0@wicourts.gov>

On May 2, 2008, at 2:43 PM, Kevin Grittner wrote:

>>>> Alexy Khrabrov wrote:
>
>> SInce I don't index on that
>> new column, I'd assume my old indices would do -- do they change
>> because of rows deletions/insertions, with the effective new rows
>> addresses?
>
> Every update is a delete and insert.  The new version of the row must
> be added to the index.  Every access through the index then has to
> look at both versions of the row to see which one is "current" for its
> transaction.  Vacuum will make the space used by the dead rows
> available for reuse, as well as removing the old index entries and
> making that space available for new index entries.

OK.  I've cancelled all previous attempts at UPDATE and will now  
create some derived tables.  See no changes in the previous huge table  
-- the added column was completely empty.  Dropped it.  Should I  
vacuum just in case, or am I guaranteed not to have any extra rows  
since no UPDATE actually went through and none are showing?

Cheers,
Alexy



view thread (21+ messages)  latest in thread

Message-ID: <C123A0EA-7B13-4297-9263-270224DF1F10@gmail.com>
Permalink:  ../C123A0EA-7B13-4297-9263-270224DF1F10@gmail.com/
Also on:    postgresql.org/message-id/C123A0EA-7B13-4297-9263-270224DF1F10@gmail.com

 · 

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: deliverable@gmail.com, Kevin.Grittner@wicourts.gov, gsmith@gregsmith.com
  Subject: Re: two memory-consuming postgres processes
  In-Reply-To: <C123A0EA-7B13-4297-9263-270224DF1F10@gmail.com>

* 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