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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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