Skip to content

Commit 8e1e3f9

Browse files
committed
Split hash.h → hash_xlog.h
Since the hash AM is going to be revamped to have WAL, this is a good opportunity to clean up the include file a little bit to avoid including a lot of extra stuff in the future. Author: Amit Kapila
1 parent 9b7cd59 commit 8e1e3f9

File tree

6 files changed

+29
-9
lines changed

6 files changed

+29
-9
lines changed

src/backend/access/hash/hash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "postgres.h"
2020

2121
#include "access/hash.h"
22+
#include "access/hash_xlog.h"
2223
#include "access/relscan.h"
2324
#include "catalog/index.h"
2425
#include "commands/vacuum.h"

src/backend/access/rmgrdesc/hashdesc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
#include "postgres.h"
1616

17-
#include "access/hash.h"
17+
#include "access/hash_xlog.h"
1818

1919
void
2020
hash_desc(StringInfo buf, XLogReaderState *record)

src/backend/access/transam/rmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "access/gin.h"
1313
#include "access/gist_private.h"
1414
#include "access/generic_xlog.h"
15-
#include "access/hash.h"
15+
#include "access/hash_xlog.h"
1616
#include "access/heapam_xlog.h"
1717
#include "access/brin_xlog.h"
1818
#include "access/multixact.h"

src/bin/pg_xlogdump/rmgrdesc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "access/generic_xlog.h"
1515
#include "access/gin.h"
1616
#include "access/gist_private.h"
17-
#include "access/hash.h"
17+
#include "access/hash_xlog.h"
1818
#include "access/heapam_xlog.h"
1919
#include "access/multixact.h"
2020
#include "access/nbtree.h"

src/include/access/hash.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "access/amapi.h"
2121
#include "access/itup.h"
2222
#include "access/sdir.h"
23-
#include "access/xlogreader.h"
2423
#include "fmgr.h"
2524
#include "lib/stringinfo.h"
2625
#include "storage/bufmgr.h"
@@ -365,9 +364,4 @@ extern bool _hash_convert_tuple(Relation index,
365364
extern OffsetNumber _hash_binsearch(Page page, uint32 hash_value);
366365
extern OffsetNumber _hash_binsearch_last(Page page, uint32 hash_value);
367366

368-
/* hash.c */
369-
extern void hash_redo(XLogReaderState *record);
370-
extern void hash_desc(StringInfo buf, XLogReaderState *record);
371-
extern const char *hash_identify(uint8 info);
372-
373367
#endif /* HASH_H */

src/include/access/hash_xlog.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* hash_xlog.h
4+
* header file for Postgres hash AM implementation
5+
*
6+
*
7+
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
8+
* Portions Copyright (c) 1994, Regents of the University of California
9+
*
10+
* src/include/access/hash_xlog.h
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
#ifndef HASH_XLOG_H
15+
#define HASH_XLOG_H
16+
17+
#include "access/hash.h"
18+
#include "access/xlogreader.h"
19+
20+
21+
extern void hash_redo(XLogReaderState *record);
22+
extern void hash_desc(StringInfo buf, XLogReaderState *record);
23+
extern const char *hash_identify(uint8 info);
24+
25+
#endif /* HASH_XLOG_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