mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Get rid of rd_nblocks field in relcache entries. Turns out this was
costing us lots more to maintain than it was worth. On shared tables it was of exactly zero benefit because we couldn't trust it to be up to date. On temp tables it sometimes saved an lseek, but not often enough to be worth getting excited about. And the real problem was that we forced an lseek on every relcache flush in order to update the field. So all in all it seems best to lose the complexity.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.109 2004/04/06 16:39:30 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.110 2004/05/08 19:09:24 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -822,10 +822,6 @@ read_info(SeqTable elm, Relation rel, Buffer *buf)
|
||||
sequence_magic *sm;
|
||||
Form_pg_sequence seq;
|
||||
|
||||
if (rel->rd_nblocks > 1)
|
||||
elog(ERROR, "invalid number of blocks in sequence \"%s\"",
|
||||
RelationGetRelationName(rel));
|
||||
|
||||
*buf = ReadBuffer(rel, 0);
|
||||
if (!BufferIsValid(*buf))
|
||||
elog(ERROR, "ReadBuffer failed");
|
||||
|
Reference in New Issue
Block a user