git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Allow git-cvsserver database table name prefix to be specified.

From
Josh Elsasser <josh@elsasser.org>
Date
Mar 27, 2008, 20:57 UTC
Message-ID
<20080327205727.GN2324@opal.elsasser.org>
In-Reply-To
<7vwsnyx8ga.fsf@gitster.siamese.dyndns.org>
On Wed, Mar 19, 2008 at 10:36:53PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> 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?
Show 13 quoted lines
> > @@ -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
Previous: Junio C HamanoNext: Josh Elsasser
Message 3 of 6 in “Allow git-cvsserver database table name prefix to be specified.”
  1. Allow git-cvsserver database table name prefix to be specified.Josh Elsasser, Mar 20, 2008
  2. Junio C HamanoMar 20, 2008
  3. Josh ElsasserMar 27, 2008
  4. Allow git-cvsserver database table name prefix to be specified.Josh Elsasser, Mar 27, 2008
  5. Johannes SchindelinMar 27, 2008
  6. Junio C HamanoMar 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.