diff options
| author | Álvaro Herrera <alvherre@kurilemu.de> | 2025-11-04 10:07:54 +0100 |
|---|---|---|
| committer | Álvaro Herrera <alvherre@kurilemu.de> | 2025-11-04 10:07:54 +0100 |
| commit | ad1581d7feaeb1d78a0858703dac1bcb52f600d8 (patch) | |
| tree | a7e6258d77a172836d507afc6230a3acbe2926c2 /src/bin/pg_basebackup/pg_createsubscriber.c | |
| parent | 65f4976189b6cbe9aa93fc5f4b1eb7a2040b6301 (diff) | |
Use USECS_PER_SEC from datatype/timestamp.h
We had two places defining their own constants for this.
Author: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Discussion: https://postgr.es/m/202510311750.mxiykx3tp4mx@alvherre.pgsql
Diffstat (limited to 'src/bin/pg_basebackup/pg_createsubscriber.c')
| -rw-r--r-- | src/bin/pg_basebackup/pg_createsubscriber.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 61175453c90..c1120d3643e 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -23,6 +23,7 @@ #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" @@ -129,7 +130,6 @@ static void drop_existing_subscription(PGconn *conn, const char *subname, 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; @@ -1604,8 +1604,7 @@ wait_for_end_recovery(const char *conninfo, const struct CreateSubscriberOptions } /* Keep waiting */ - pg_usleep(WAIT_INTERVAL * USEC_PER_SEC); - + pg_usleep(WAIT_INTERVAL * USECS_PER_SEC); timer += WAIT_INTERVAL; } |
