[Groonga-commit] pgroonga/pgroonga at 02f93e7 [master] Make buildable with PostgreSQL < 10 again

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jul 19 08:34:42 JST 2017


Kouhei Sutou	2017-07-19 08:34:42 +0900 (Wed, 19 Jul 2017)

  New Revision: 02f93e7d95e8d416a3679a5d8a0b13a98126fa3f
  https://github.com/pgroonga/pgroonga/commit/02f93e7d95e8d416a3679a5d8a0b13a98126fa3f

  Message:
    Make buildable with PostgreSQL < 10 again

  Modified files:
    src/pgroonga.c

  Modified: src/pgroonga.c (+15 -1)
===================================================================
--- src/pgroonga.c    2017-07-18 23:42:08 +0900 (fb6e81f)
+++ src/pgroonga.c    2017-07-19 08:34:42 +0900 (83b1382)
@@ -437,10 +437,24 @@ PGrnInitializePrefixRKSequentialSearchData(void)
 						 NULL);
 }
 
+static bool
+PGrnNeedInitialize(void)
+{
+#ifdef PGRN_SUPPORT_LOGICAL_REPLICATION
+	if (MyLogicalRepWorker)
+		return true;
+#endif
+
+	if (MyBgworkerEntry)
+		return false;
+
+	return true;
+}
+
 void
 _PG_init(void)
 {
-	if (MyBgworkerEntry && !MyLogicalRepWorker)
+	if (!PGrnNeedInitialize())
 		return;
 
 	if (PGrnInitialized)
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index