Skip site navigation (1) Skip section navigation (2)

Re: Thanks, naming conventions, and count()

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alfred Perlstein <bright(at)wintelcom(dot)net>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, Casey Lyon <casey(at)earthcars(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Thanks, naming conventions, and count()
Date: 2001-04-30 03:20:54
Message-ID: 200104300320.f3U3Kse11155@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
> * Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> [010429 20:14] wrote:
> 
> > Yes, I like that idea, but the problem is that it is hard to update just
> > one table in the file.  You sort of have to update the entire file each
> > time a table changes.  That is why I liked symlinks because they are
> > per-table, but you are right that the symlink creation could fail
> > because the new table file was never created or something, leaving the
> > symlink pointing to nothing.  Not sure how to address this.  Is there a
> > way to update a flat file when a single table changes?
> 
> Sort of, if that flat file is in the form of:
> 123456;"tablename                   "
> 000033;"another_table               "
> 
> ie, each line is a fixed length.
> 

Yea, after I posted, I realized that using a fixed length line would
solve the problem.  The larger problem, though, I think, is concurrency.
Can multiple backends update that single flat file reliably?  I suppose
they could do append-only to the file, and you could grab the last
entry, but again, sometimes it is rolled back, so I think there has to
be a way to clean it up.

Of course, Tom or Vadim may come along and say this is a stupid idea,
and we would be done discussing it.  :-)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-hackers by date

Next:From: The Hermit HackerDate: 2001-04-30 03:21:16
Subject: Re: Thanks, naming conventions, and count()
Previous:From: Alfred PerlsteinDate: 2001-04-30 03:17:28
Subject: Re: Thanks, naming conventions, and count()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group