Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke committed Oct 8, 2024
1 parent cd85064 commit 118319d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/backend/access/aocs/test/aocsam_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test__aocs_begin_headerscan(void **state)
SMgrRelationData smgrdata;
FormData_pg_class pgclass;

memset(&reldata, 0, sizeof(SMgrRelationData));
memset(&reldata, 0, sizeof(RelationData));

reldata.rd_rel = &pgclass;
reldata.rd_id = 12345;
Expand Down
18 changes: 8 additions & 10 deletions src/include/storage/smgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct SMgrRelationData
char smgr_relpersistence;
/* pointer to storage manager */
const struct f_smgr *smgr;
/*pointer to AO storage manager */
/*pointer to AO storage manager */
const struct f_smgr_ao *smgr_ao;

/*
Expand Down Expand Up @@ -131,24 +131,22 @@ typedef struct f_smgr
} f_smgr;

typedef struct f_smgr_ao {
off_t (*smgr_FileDiskSize) (File file);
void (*smgr_FileClose) (File file);
int (*smgr_FileTruncate) (File file, int64 offset, uint32 wait_event_info);
File (*smgr_AORelOpenSegFile) (const char *filePath, int fileFlags);
int (*smgr_FileWrite) (File file, char *buffer, int amount, off_t offset, uint32 wait_event_info);
int (*smgr_FileRead) (File file, char *buffer, int amount, off_t offset, uint32 wait_event_info);
int (*smgr_FileSync) (File file, uint32 wait_event_info);
off_t (*smgr_FileDiskSize) (File file);
void (*smgr_FileClose) (File file);
int (*smgr_FileTruncate) (File file, int64 offset, uint32 wait_event_info);
File (*smgr_AORelOpenSegFile) (const char *filePath, int fileFlags);
int (*smgr_FileWrite) (File file, char *buffer, int amount, off_t offset, uint32 wait_event_info);
int (*smgr_FileRead) (File file, char *buffer, int amount, off_t offset, uint32 wait_event_info);
int (*smgr_FileSync) (File file, uint32 wait_event_info);
} f_smgr_ao;


typedef void (*smgr_init_hook_type) (void);
typedef void (*smgr_hook_type) (SMgrRelation reln, BackendId backend, SMgrImpl which, Relation rel);
typedef void (*smgr_shutdown_hook_type) (void);
typedef void (*smgrao_hook_type)(SMgrRelation reln, BackendId backend, SMgrImpl which, Relation rel);
extern PGDLLIMPORT smgr_init_hook_type smgr_init_hook;
extern PGDLLIMPORT smgr_hook_type smgr_hook;
extern PGDLLIMPORT smgr_shutdown_hook_type smgr_shutdown_hook;
extern PGDLLIMPORT smgrao_hook_type smgrao_hook;

extern bool smgr_is_heap_relation(SMgrRelation reln);

Expand Down
3 changes: 2 additions & 1 deletion src/include/utils/datumstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ extern DatumStreamRead *create_datumstreamread(
Form_pg_attribute attr,
char *relname,
char *title,
RelFileNode *relFileNode, const struct f_smgr_ao *smgrAO);
RelFileNode *relFileNode,
const struct f_smgr_ao *smgrAO);

extern void datumstreamwrite_open_file(
DatumStreamWrite * ds,
Expand Down

0 comments on commit 118319d

Please sign in to comment.