#include "common/logging.h"
#include "common/pg_prng.h"
#include "common/restricted_token.h"
+#include "datatype/timestamp.h"
#include "fe_utils/recovery_gen.h"
#include "fe_utils/simple_list.h"
#include "fe_utils/string_utils.h"
static void get_publisher_databases(struct CreateSubscriberOptions *opt,
bool dbnamespecified);
-#define USEC_PER_SEC 1000000
#define WAIT_INTERVAL 1 /* 1 second */
static const char *progname;
}
/* Keep waiting */
- pg_usleep(WAIT_INTERVAL * USEC_PER_SEC);
-
+ pg_usleep(WAIT_INTERVAL * USECS_PER_SEC);
timer += WAIT_INTERVAL;
}
#include "common/file_perm.h"
#include "common/logging.h"
#include "common/string.h"
+#include "datatype/timestamp.h"
#include "getopt_long.h"
#include "utils/pidfile.h"
#define DEFAULT_WAIT 60
-#define USEC_PER_SEC 1000000
-
-#define WAITS_PER_SEC 10 /* should divide USEC_PER_SEC evenly */
+#define WAITS_PER_SEC 10
+StaticAssertDecl(USECS_PER_SEC % WAITS_PER_SEC == 0,
+ "WAITS_PER_SEC must divide USECS_PER_SEC evenly");
static bool do_wait = true;
static int wait_seconds = DEFAULT_WAIT;
print_msg(".");
}
- pg_usleep(USEC_PER_SEC / WAITS_PER_SEC);
+ pg_usleep(USECS_PER_SEC / WAITS_PER_SEC);
}
/* out of patience; report that postmaster is still starting up */
if (cnt % WAITS_PER_SEC == 0)
print_msg(".");
- pg_usleep(USEC_PER_SEC / WAITS_PER_SEC);
+ pg_usleep(USECS_PER_SEC / WAITS_PER_SEC);
}
return false; /* timeout reached */
}
if (cnt % WAITS_PER_SEC == 0)
print_msg(".");
- pg_usleep(USEC_PER_SEC / WAITS_PER_SEC);
+ pg_usleep(USECS_PER_SEC / WAITS_PER_SEC);
}
return false; /* timeout reached */
}