Skip to content

Commit

Permalink
Fix some compiler warnings in vendor/postgres, and pull libpqwalpropo…
Browse files Browse the repository at this point in the history
…ser into vendor/neon
  • Loading branch information
MMeent committed Aug 9, 2022
1 parent 73092bb commit 7996665
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 40 deletions.
2 changes: 1 addition & 1 deletion contrib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SUBDIRS = \
lo \
ltree \
neon \
neon/libpqwalproposer \
# neon/libpqwalproposer
neon_test_utils \
oid2name \
old_snapshot \
Expand Down
1 change: 1 addition & 0 deletions contrib/neon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ OBJS = \
$(WIN32RES) \
inmem_smgr.o \
libpagestore.o \
libpqwalproposer.o \
pagestore_smgr.o \
relsize_cache.o \
neon.o \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#include "postgres.h"

#include "../walproposer.h"
#include "libpq-fe.h"

/* Required for anything that's dynamically loaded */
PG_MODULE_MAGIC;
void _PG_init(void);
#include "neon.h"
#include "walproposer.h"

/* Header in walproposer.h -- Wrapper struct to abstract away the libpq connection */
struct WalProposerConn
Expand Down Expand Up @@ -46,7 +43,7 @@ static WalProposerFunctionsType PQWalProposerFunctions = {

/* Module initialization */
void
_PG_init(void)
pg_init_libpqwalproposer(void)
{
if (WalProposerFunctions != NULL)
elog(ERROR, "libpqwalproposer already loaded");
Expand Down
30 changes: 0 additions & 30 deletions contrib/neon/libpqwalproposer/Makefile

This file was deleted.

1 change: 1 addition & 0 deletions contrib/neon/neon.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void _PG_init(void);
void _PG_init(void)
{
pg_init_libpagestore();
pg_init_libpqwalproposer();
pg_init_walproposer();
}

Expand Down
1 change: 1 addition & 0 deletions contrib/neon/neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define NEON_H

extern void pg_init_libpagestore(void);
extern void pg_init_libpqwalproposer(void);
extern void pg_init_walproposer(void);

#endif /* NEON_H */
2 changes: 1 addition & 1 deletion contrib/neon/pagestore_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ extern void zenith_write(SMgrRelation reln, ForkNumber forknum,
extern void zenith_writeback(SMgrRelation reln, ForkNumber forknum,
BlockNumber blocknum, BlockNumber nblocks);
extern BlockNumber zenith_nblocks(SMgrRelation reln, ForkNumber forknum);
extern int64 zenith_dbsize(Oid dbNode);
extern const int64 zenith_dbsize(Oid dbNode);
extern void zenith_truncate(SMgrRelation reln, ForkNumber forknum,
BlockNumber nblocks);
extern void zenith_immedsync(SMgrRelation reln, ForkNumber forknum);
Expand Down
2 changes: 1 addition & 1 deletion contrib/neon/pagestore_smgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ zenith_nblocks(SMgrRelation reln, ForkNumber forknum)
/*
* zenith_db_size() -- Get the size of the database in bytes.
*/
int64
const int64
zenith_dbsize(Oid dbNode)
{
ZenithResponse *resp;
Expand Down
1 change: 0 additions & 1 deletion contrib/neon/walproposer_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static bool streamingDoneReceiving;
static bool WalSndCaughtUp = false;

/* Flags set by signal handlers for later service in main loop */
static volatile sig_atomic_t got_SIGUSR2 = false;
static volatile sig_atomic_t got_STOPPING = false;

/*
Expand Down

0 comments on commit 7996665

Please sign in to comment.