Skip to content

Commit e5e5de8

Browse files
committed
Back out:
> this is patch v 0.4 to support transactions with BLOBs. > All BLOBs are in one table. You need to make initdb. > > -- > Sincerely Yours, > Denis Perchine
1 parent cf5a950 commit e5e5de8

File tree

9 files changed

+30
-226
lines changed

9 files changed

+30
-226
lines changed

src/backend/catalog/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for catalog
44
#
5-
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.26 2000/10/08 03:18:53 momjian Exp $
5+
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.27 2000/10/08 03:53:13 momjian Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -11,8 +11,7 @@ top_builddir = ../../..
1111
include $(top_builddir)/src/Makefile.global
1212

1313
OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
14-
pg_aggregate.o pg_largeobject.o pg_operator.o pg_proc.o \
15-
pg_type.o
14+
pg_aggregate.o pg_operator.o pg_proc.o pg_type.o
1615

1716
BKIFILES = global.bki template1.bki global.description template1.description
1817

src/backend/catalog/indexing.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.68 2000/10/08 03:18:53 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.69 2000/10/08 03:53:13 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -51,8 +51,6 @@ char *Name_pg_inherits_indices[Num_pg_inherits_indices] =
5151
{InheritsRelidSeqnoIndex};
5252
char *Name_pg_language_indices[Num_pg_language_indices] =
5353
{LanguageOidIndex, LanguageNameIndex};
54-
char *Name_pg_largeobject_indices[Num_pg_largeobject_indices] =
55-
{LargeobjectLOIdIndex, LargeobjectLOIdPNIndex};
5654
char *Name_pg_listener_indices[Num_pg_listener_indices] =
5755
{ListenerPidRelnameIndex};
5856
char *Name_pg_opclass_indices[Num_pg_opclass_indices] =

src/backend/catalog/pg_largeobject.c

Lines changed: 0 additions & 138 deletions
This file was deleted.

src/backend/libpq/be-fsstubs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.51 2000/10/08 03:18:54 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.52 2000/10/08 03:53:13 momjian Exp $
1212
*
1313
* NOTES
1414
* This should be moved to a more appropriate place. It is here
@@ -267,7 +267,7 @@ lo_creat(PG_FUNCTION_ARGS)
267267
PG_RETURN_OID(InvalidOid);
268268
}
269269

270-
lobjId = lobjDesc->id;
270+
lobjId = RelationGetRelid(lobjDesc->heap_r);
271271

272272
inv_close(lobjDesc);
273273

@@ -512,10 +512,8 @@ lo_commit(bool isCommit)
512512
{
513513
if (cookies[i] != NULL)
514514
{
515-
/*
516515
if (isCommit)
517516
inv_cleanindex(cookies[i]);
518-
*/
519517
cookies[i] = NULL;
520518
}
521519
}

src/backend/storage/large_object/inv_api.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.75 2000/10/08 03:18:54 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.76 2000/10/08 03:53:14 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -261,11 +261,15 @@ inv_close(LargeObjectDesc *obj_desc)
261261
{
262262
Assert(PointerIsValid(obj_desc));
263263

264-
if (obj_desc->flags & IFS_WRLOCK)
265-
heap_close(obj_desc->heap_r, RowExclusiveLock);
266-
else if (obj_desc->flags & IFS_RDLOCK)
267-
heap_close(obj_desc->heap_r, AccessShareLock);
264+
if (obj_desc->iscan != (IndexScanDesc) NULL)
265+
{
266+
index_endscan(obj_desc->iscan);
267+
obj_desc->iscan = NULL;
268+
}
269+
268270
index_close(obj_desc->index_r);
271+
heap_close(obj_desc->heap_r, AccessShareLock);
272+
269273
pfree(obj_desc);
270274
}
271275

src/include/catalog/catname.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: catname.h,v 1.13 2000/10/08 03:18:55 momjian Exp $
10+
* $Id: catname.h,v 1.14 2000/10/08 03:53:15 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -29,7 +29,6 @@
2929
#define InheritsRelationName "pg_inherits"
3030
#define InheritancePrecidenceListRelationName "pg_ipl"
3131
#define LanguageRelationName "pg_language"
32-
#define LargeobjectRelationName "pg_largeobject"
3332
#define ListenerRelationName "pg_listener"
3433
#define LogRelationName "pg_log"
3534
#define OperatorClassRelationName "pg_opclass"

src/include/catalog/indexing.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: indexing.h,v 1.41 2000/10/08 03:18:55 momjian Exp $
11+
* $Id: indexing.h,v 1.42 2000/10/08 03:53:15 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -31,7 +31,6 @@
3131
#define Num_pg_index_indices 2
3232
#define Num_pg_inherits_indices 1
3333
#define Num_pg_language_indices 2
34-
#define Num_pg_largeobject_indices 2
3534
#define Num_pg_listener_indices 1
3635
#define Num_pg_opclass_indices 2
3736
#define Num_pg_operator_indices 2
@@ -93,7 +92,6 @@ extern char *Name_pg_group_indices[];
9392
extern char *Name_pg_index_indices[];
9493
extern char *Name_pg_inherits_indices[];
9594
extern char *Name_pg_language_indices[];
96-
extern char *Name_pg_largeobject_indices[];
9795
extern char *Name_pg_listener_indices[];
9896
extern char *Name_pg_opclass_indices[];
9997
extern char *Name_pg_operator_indices[];

src/include/catalog/pg_largeobject.h

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/include/storage/large_object.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: large_object.h,v 1.14 2000/10/08 03:18:57 momjian Exp $
11+
* $Id: large_object.h,v 1.15 2000/10/08 03:53:15 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -22,11 +22,17 @@
2222
/*
2323
* This structure will eventually have lots more stuff associated with it.
2424
*/
25-
typedef struct LargeObjectDesc {
26-
Relation heap_r;
27-
Relation index_r;
25+
typedef struct LargeObjectDesc
26+
{
27+
Relation heap_r; /* heap relation */
28+
Relation index_r; /* index relation on seqno attribute */
29+
IndexScanDesc iscan; /* index scan we're using */
30+
TupleDesc hdesc; /* heap relation tuple desc */
31+
TupleDesc idesc; /* index relation tuple desc */
32+
uint32 lowbyte; /* low byte on the current page */
33+
uint32 highbyte; /* high byte on the current page */
2834
uint32 offset; /* current seek pointer */
29-
Oid id;
35+
ItemPointerData htid; /* tid of current heap tuple */
3036

3137
#define IFS_RDLOCK (1 << 0)
3238
#define IFS_WRLOCK (1 << 1)
@@ -49,4 +55,7 @@ extern int inv_tell(LargeObjectDesc *obj_desc);
4955
extern int inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes);
5056
extern int inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes);
5157

58+
/* added for buffer leak prevention [ PA ] */
59+
extern void inv_cleanindex(LargeObjectDesc *obj_desc);
60+
5261
#endif /* LARGE_OBJECT_H */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy