git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Elsasser <josh@elsasser.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Frank Lichtenheld <frank@lichtenheld.de>
Subject: Re: [PATCH v2] Allow git-cvsserver database table name prefix to be specified.
Date: Thu, 27 Mar 2008 13:57:27 -0700	[thread overview]
Message-ID: <20080327205727.GN2324@opal.elsasser.org> (raw)
In-Reply-To: <7vwsnyx8ga.fsf@gitster.siamese.dyndns.org>

On Wed, Mar 19, 2008 at 10:36:53PM -0700, Junio C Hamano wrote:
> Josh Elsasser <josh@elsasser.org> writes:
> 
> > The purpose of this patch is to easily allow a single database (think
> > PostgreSQL or MySQL) to be shared by multiple repositories.
> 
> I am not sure if this is even a good idea.  You can share a single
> database cluster (in PostgreSQL lingo, I do not recall how MySQL calls it)
> and have multiple database instances on it, which would give you better
> isolation between repositories.  What's the advantage of your approach, I
> have to wonder.

Unless I misunderstand what you mean, that is exactly what I would
like to be able to avoid. A user may not always be able to create new
database instances, or may just want to avoid creating a new one for
each repository.

> > +gitcvs.dbprefix::
> 
> And it would not be dbprefix but table name prefix.  

All right, how does gitcvs.dbTableNamePrefix sound?

> > @@ -2349,10 +2353,10 @@ sub new
> >      }
> >  
> >      # Construct the revision table if required
> > -    unless ( $self->{tables}{revision} )
> > +    unless ( $self->{tables}{"$self->{dbprefix}revision"} )
> 
> Hmmm.  If we are going to insist on having multiple tables in a single
> database, can we make sure we have better chances of catching mistakes by
> doing something like...
> 
>     * Identify the set of tables and indices one repository would use
>       (i.e. revision, revision_ix1, etc.)

It did occur to me that I should abstract it a little more, I just
ended up being lazy about it. A slightly cleaner version should follow
this mail.

 -jre

  reply	other threads:[~2008-03-27 20:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20  5:05 [PATCH v2] Allow git-cvsserver database table name prefix to be specified Josh Elsasser
2008-03-20  5:36 ` Junio C Hamano
2008-03-27 20:57   ` Josh Elsasser [this message]
2008-03-27 21:02     ` [PATCH v3] " Josh Elsasser
2008-03-27 22:35       ` Johannes Schindelin
2008-03-27 23:13       ` Junio C Hamano

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080327205727.GN2324@opal.elsasser.org \
    --to=josh@elsasser.org \
    --cc=frank@lichtenheld.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).