On 5 December 2017 at 22:49, Robert Haas <robertmh...@gmail.com> wrote:
> > Committed with these additions. Please check that I haven't messed > anything up. > > Looks good to me. For the record the commit is commit c572599c65bfe0387563233faabecd2845073538 Author: Robert Haas <rh...@postgresql.org> Date: Tue Dec 5 09:23:57 2017 -0500 Mark assorted variables PGDLLIMPORT. This makes life easier for extension authors who wish to support Windows. Brian Cloutier, slightly amended by me. Discussion: http://postgr.es/m/cajcy68fscdnhmzfps4kyo00cadkvxvea-28h-otenk-pa2o...@mail.gmail.com plus back branches. I was going to pipe up here to add ReplicationSlotCtl to the list. Otherwise the only way to access slot information is via the SPI and pg_stat_replication_slots, which isn't super fun. And it's not like ReplicationSlotCtl is any more internal than MyReplicationSlot. I missed the boat on your commit, but ... please? Patches attached. MyReplicationSlot was only made PGDLLIMPORT in 9.6, so there's one for 9.4/9.5 and one for 9.6, 10, and master. Personally I don't care about 9.4/9.5 in the slightest for this, but that's where c572599c is backpatched to. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
From de25c6aff0e07b6acf761a3b939baf2be0fa6389 Mon Sep 17 00:00:00 2001 From: Craig Ringer <cr...@2ndquadrant.com> Date: Thu, 7 Dec 2017 13:40:13 +0800 Subject: [PATCH v1] Make MyReplicationSlot and ReplicationSlotCtl PGDLLIMPORT --- src/include/replication/slot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h index c129a4a..0fee63c 100644 --- a/src/include/replication/slot.h +++ b/src/include/replication/slot.h @@ -136,8 +136,8 @@ typedef struct ReplicationSlotCtlData /* * Pointers to shared memory */ -extern ReplicationSlotCtlData *ReplicationSlotCtl; -extern ReplicationSlot *MyReplicationSlot; +extern PGDLLIMPORT ReplicationSlotCtlData *ReplicationSlotCtl; +extern PGDLLIMPORT ReplicationSlot *MyReplicationSlot; /* GUCs */ extern PGDLLIMPORT int max_replication_slots; -- 2.9.5
From 9e7331ecb3889cbdccc3f8a3a62ac71f215bb3f6 Mon Sep 17 00:00:00 2001 From: Craig Ringer <cr...@2ndquadrant.com> Date: Thu, 7 Dec 2017 13:32:11 +0800 Subject: [PATCH v1] Mark ReplicationSlotCtl as PGDLLIMPORT --- src/include/replication/slot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h index 0c44233..c3b7cc8 100644 --- a/src/include/replication/slot.h +++ b/src/include/replication/slot.h @@ -156,7 +156,7 @@ typedef struct ReplicationSlotCtlData /* * Pointers to shared memory */ -extern ReplicationSlotCtlData *ReplicationSlotCtl; +extern PGDLLIMPORT ReplicationSlotCtlData *ReplicationSlotCtl; extern PGDLLIMPORT ReplicationSlot *MyReplicationSlot; /* GUCs */ -- 2.9.5