Re: Review: Fix snapshot taking inconsistencies

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>, Steve Singer <ssinger_pg(at)sympatico(dot)ca>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: Fix snapshot taking inconsistencies
Date: 2010-10-17 03:15:07
Message-ID: 1287285125-sup-7206@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Tom Lane's message of mar oct 12 20:49:28 -0300 2010:
> Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> writes:
> > On 2010-10-13 2:10 AM +0300, Tom Lane wrote:
> >> BTW, this patch seems to be also the time to remove the AtStart_Cache()
> >> call in CommandCounterIncrement, as foreseen in the comment there.
>
> > Frankly, I have no idea what to do about this.
>
> Just delete the call. The only reason I didn't remove it in 2007 is
> I was afraid to risk changing things in late beta; but that's not the
> situation now.

I just applied just this change and ran the regression tests; it works
fine. I didn't do anything else though, like the cache-clobber-always
flag, etc. If no one objects I will push this patch to see what the
buildfarm has to say about it.

diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index b02db9e..d2e2e11 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -729,17 +729,6 @@ CommandCounterIncrement(void)
*/
AtCCI_LocalCache();
}
-
- /*
- * Make any other backends' catalog changes visible to me.
- *
- * XXX this is probably in the wrong place: CommandCounterIncrement should
- * be purely a local operation, most likely. However fooling with this
- * will affect asynchronous cross-backend interactions, which doesn't seem
- * like a wise thing to do in late beta, so save improving this for
- * another day - tgl 2007-11-30
- */
- AtStart_Cache();
}

/*

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2010-10-17 04:54:08 Re: Keywords in pg_hba.conf should be field-specific
Previous Message Alvaro Herrera 2010-10-17 03:09:51 Re: Extensions, this time with a patch