Re: [v9.1] sepgsql - userspace access vector cache

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Yeb Havinga <yebhavinga(at)gmail(dot)com>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, Kohei Kaigai <kohei(dot)kaigai(at)emea(dot)nec(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.1] sepgsql - userspace access vector cache
Date: 2011-09-06 13:35:54
Message-ID: CA+TgmobAQ-ek18NAjYp8wJtRSS7RfQA8BST+bujD-xmviXOQ5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 6, 2011 at 12:41 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
>> > Pity we can't use git notes.
>>
>> Well, I guess there's no law that says we can't.  Should I give it a try?
>
> I don't see why not :-)  (But my guess is that you're going to need to
> publish some pull and push instructions, because I gather it's not trivial).

I spent some time looking at this this morning, and my reaction is....
yeeeeaggh!!

To make this work, everyone who commits to the repository and everyone
who pulls from the repository must update their .git/config file. And
if by some poor chance two people should happen to make changes to the
git notes on the same file, a horrible merge process ensues.

Here's a relevant blog entry: http://progit.org/2010/08/25/notes.html

I also discovered that when you first create a note in your local
repository, you get a new ref called notes/commits (branches and tags
are also refs). Once you have this, it is extremely nontrivial to
figure out how to get rid of it. Removing the note doesn't work,
because that's treated as a new commit on the ref, not a request to
undo the previous commit. Unlike regular branches, there don't seem
to be any tools for getting rid of commits (i.e. git reset --hard
origin/master) and unlike both branches and tags, there's no
particularly obvious way to delete the ref completely (git branch { -d
| -D }, git tag -d). I finally found a message on a mailing list with
the magic formula, which turns out to be "git update-ref -d
refs/notes/commits" (and not, as I had initially guessed, "git
update-ref -d notes/commits", which silently succeeds but fails to
accomplish anything).

As much as I'd like to have something like this, I'm inclined to think
that it will take a whole lot more time to get this facility working
than it's really worth. Unless someone has a strong opinion the other
way, I think we should just plan to revisit this in a year or two, or
whenever the git folks have gotten around to polishing this some more.
It feels like a potentially good feature that is still really
half-baked at this point.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-09-06 13:40:08 Re: B-tree parent pointer and checkpoints
Previous Message hubert depesz lubaczewski 2011-09-06 11:13:58 Re: [GENERAL] pg_upgrade problem