diff options
| author | Bruce Momjian | 2002-08-15 16:36:08 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2002-08-15 16:36:08 +0000 |
| commit | b1a5f8720987fbfda23c6bfb4a0dd683b9bdae70 (patch) | |
| tree | 9212ba16b7941ad741708dd0999beaf3e6948232 /src/backend/storage | |
| parent | 38294db64bce9e78e6a1fc55fb6746074de59d2b (diff) | |
Tom Lane wrote:
> There's no longer a separate call to heap_storage_create in that routine
> --- the right place to make the test is now in the storage_create
> boolean parameter being passed to heap_create. A simple change, but
> it passeth patch's understanding ...
Thanks.
Attached is a patch against cvs tip as of 8:30 PM PST or so. Turned out
that even after fixing the failed hunks, there was a new spot in
bufmgr.c which needed to be fixed (related to temp relations;
RelationUpdateNumberOfBlocks). But thankfully the regression test code
caught it :-)
Joe Conway
Diffstat (limited to 'src/backend/storage')
| -rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 6 | ||||
| -rw-r--r-- | src/backend/storage/smgr/smgr.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 11df91c25cf..550bd6e70d5 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.129 2002/08/11 21:17:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.130 2002/08/15 16:36:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1051,6 +1051,8 @@ RelationGetNumberOfBlocks(Relation relation) */ if (relation->rd_rel->relkind == RELKIND_VIEW) relation->rd_nblocks = 0; + else if (relation->rd_rel->relkind == RELKIND_COMPOSITE_TYPE) + relation->rd_nblocks = 0; else if (!relation->rd_isnew && !relation->rd_istemp) relation->rd_nblocks = smgrnblocks(DEFAULT_SMGR, relation); return relation->rd_nblocks; @@ -1069,6 +1071,8 @@ RelationUpdateNumberOfBlocks(Relation relation) { if (relation->rd_rel->relkind == RELKIND_VIEW) relation->rd_nblocks = 0; + else if (relation->rd_rel->relkind == RELKIND_COMPOSITE_TYPE) + relation->rd_nblocks = 0; else relation->rd_nblocks = smgrnblocks(DEFAULT_SMGR, relation); } diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 252781d9c3f..dab9b5dcbb2 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.58 2002/08/06 02:36:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.59 2002/08/15 16:36:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -263,6 +263,8 @@ smgropen(int16 which, Relation reln, bool failOK) if (reln->rd_rel->relkind == RELKIND_VIEW) return -1; + if (reln->rd_rel->relkind == RELKIND_COMPOSITE_TYPE) + return -1; if ((fd = (*(smgrsw[which].smgr_open)) (reln)) < 0) if (!failOK) elog(ERROR, "cannot open %s: %m", RelationGetRelationName(reln)); |
