summaryrefslogtreecommitdiff
path: root/dev-db/pglogical/files/32bit.patch
blob: 22bf3352d52d78cdd5fd813af447d9fe87a05a39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From f0df3fb519835c7b5893fdf3a6583e0aa859f38d Mon Sep 17 00:00:00 2001
From: Dan Goodliffe <dan@randomdan.homeip.net>
Date: Mon, 19 Dec 2016 16:14:27 +0000
Subject: [PATCH] Fix elog format string for 32bit architectures

---
 pglogical_manager.c |  2 +-
 pglogical_worker.c  | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pglogical_manager.c b/pglogical_manager.c
index 6de68ad..74e8356 100644
--- a/pglogical_manager.c
+++ b/pglogical_manager.c
@@ -156,7 +156,7 @@ manage_apply_workers(void)
 		/* Cleanup old info about crashed apply workers. */
 		if (worker && worker->crashed_at != 0)
 		{
-			elog(DEBUG2, "cleaning pglogical worker slot %ld",
+			elog(DEBUG2, "cleaning pglogical worker slot %zu",
 			     (worker - &PGLogicalCtx->workers[0]));
 			worker->worker_type = PGLOGICAL_WORKER_NONE;
 			worker->crashed_at = 0;
diff --git a/pglogical_worker.c b/pglogical_worker.c
index 040b515..d9cc7da 100644
--- a/pglogical_worker.c
+++ b/pglogical_worker.c
@@ -203,7 +203,7 @@ wait_for_worker_startup(PGLogicalWorker *worker,
 
 		if (status == BGWH_STARTED && pglogical_worker_running(worker))
 		{
-			elog(DEBUG2, "%s worker at slot %ld started with pid %d and attached to shmem",
+			elog(DEBUG2, "%s worker at slot %zu started with pid %d and attached to shmem",
 				 pglogical_worker_type_name(worker->worker_type), (worker - &PGLogicalCtx->workers[0]), pid);
 			break;
 		}
@@ -241,7 +241,7 @@ wait_for_worker_startup(PGLogicalWorker *worker,
 				 * attaching to shmem so it didn't set crashed_at. Mark it
 				 * crashed so the slot can be re-used.
 				 */
-				elog(DEBUG2, "%s worker at slot %ld exited prematurely",
+				elog(DEBUG2, "%s worker at slot %zu exited prematurely",
 					 pglogical_worker_type_name(worker->worker_type), (worker - &PGLogicalCtx->workers[0]));
 				worker->crashed_at = GetCurrentTimestamp();
 			}
@@ -252,7 +252,7 @@ wait_for_worker_startup(PGLogicalWorker *worker,
 				 * replaced. Either way, we don't care, we're only looking for crashes before
 				 * shmem attach.
 				 */
-				elog(DEBUG2, "%s worker at slot %ld exited before we noticed it started",
+				elog(DEBUG2, "%s worker at slot %zu exited before we noticed it started",
 					 pglogical_worker_type_name(worker->worker_type), (worker - &PGLogicalCtx->workers[0]));
 			}
 			break;
@@ -336,7 +336,7 @@ pglogical_worker_detach(bool crash)
 	Assert(MyPGLogicalWorker->generation == MyPGLogicalWorkerGeneration);
 	MyPGLogicalWorker->proc = NULL;
 
-	elog(LOG, "%s worker [%d] at slot %ld generation %hu %s",
+	elog(LOG, "%s worker [%d] at slot %zu generation %hu %s",
 		 pglogical_worker_type_name(MyPGLogicalWorker->worker_type),
 		 MyProcPid, MyPGLogicalWorker - &PGLogicalCtx->workers[0],
 		 MyPGLogicalWorkerGeneration,
@@ -506,7 +506,7 @@ pglogical_worker_kill(PGLogicalWorker *worker)
 	Assert(LWLockHeldByMe(PGLogicalCtx->lock));
 	if (pglogical_worker_running(worker))
 	{
-		elog(DEBUG2, "killing pglogical %s worker [%d] at slot %ld",
+		elog(DEBUG2, "killing pglogical %s worker [%d] at slot %zu",
 			 pglogical_worker_type_name(worker->worker_type),
 			 worker->proc->pid, (worker - &PGLogicalCtx->workers[0]));
 		kill(worker->proc->pid, SIGTERM);