From 5999e78fc45dcb91784b64b6e9ae43f4e4f68ca2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 1 Oct 2001 05:36:17 +0000 Subject: Another round of cleanups for dynahash.c (maybe it's finally clean of portability issues). Caller-visible data structures are now allocated on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'. Rejigger hash_create API so that caller specifies size of key and total size of entry, not size of key and size of rest of entry. This simplifies life considerably since each number is just a sizeof(), and padding issues etc. are taken care of automatically. --- src/include/storage/buf_internals.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/include/storage/buf_internals.h') diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index f85a93c258a..aa468905bff 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: buf_internals.h,v 1.50 2001/09/29 04:02:26 tgl Exp $ + * $Id: buf_internals.h,v 1.51 2001/10/01 05:36:17 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -115,6 +115,13 @@ typedef struct sbufdesc #define BL_IO_IN_PROGRESS (1 << 0) /* unimplemented */ #define BL_PIN_COUNT_LOCK (1 << 1) +/* entry for buffer hashtable */ +typedef struct +{ + BufferTag key; + Buffer id; +} BufferLookupEnt; + /* * mao tracing buffer allocation */ -- cgit v1.2.3