Subject | Re: [firebird-support] Table ID limit |
---|---|
Author | Ann W. Harrison |
Post date | 2008-11-05T23:36:40Z |
Leyne, Sean wrote:
dropped tables. At one point we considered scavenging old table
ids ... it might have happened ... but it got more complicated
the more we looked at it. RDB$RELATION_ID is a short, probably
a signed short, and so you'll get int trouble if the value is
more than 32767.
If you get there by creating and dropping tables on a regular
basis, then backup and restore will fix it. If you've actually
got 32139 tables (the first 128 are reserved for system tables)
then you've got a really complex database.
the indexes, on pointer pages, on data pages, and generally will
turn to ... an unpleasant mess ... if you try to change it.
Good luck,
Ann
>In fact, a backup and restore will solve the problem if you have
>> How do I tell when I have run out of new table IDs? And if I have,
>> will a backup and restore fix the problem?
>
> - you can execute the following SQL to find out the last ID value:
> SELECT MAX( rdb$relation_id) FROM rdb$relations
> - if you have reached the limit,
> a backup/restore will not solve the problem.
dropped tables. At one point we considered scavenging old table
ids ... it might have happened ... but it got more complicated
the more we looked at it. RDB$RELATION_ID is a short, probably
a signed short, and so you'll get int trouble if the value is
more than 32767.
If you get there by creating and dropping tables on a regular
basis, then backup and restore will fix it. If you've actually
got 32139 tables (the first 128 are reserved for system tables)
then you've got a really complex database.
> I don't know where the next Table ID value is stored (I thought a systemI think it's stored in RDB$DATABASE.
> defined Generator, but can't find it).
>> A backup/restore will not resetLots of other problems. The RDB$RELATION_ID value is stored in
> the ID, and trying to manually set the ID will get you into other
> problems.
the indexes, on pointer pages, on data pages, and generally will
turn to ... an unpleasant mess ... if you try to change it.
Good luck,
Ann