View Issue Details

IDProjectCategoryView StatusLast Update
0000178Pgpool-IIBugpublic2016-06-09 15:06
ReporterTitanOfOldAssigned Tot-ishii 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionopen 
PlatformGentoo LinuxOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000178: Enironment Variable PG_CONFIG Ignored
DescriptionThe Makefiles under src/sql/ that handle building and/or installing the PostgreSQL extensions ignores the PG_CONFIG environment variable when set as the Makefiles always set PG_CONFIG to "pg_config", which defaults to whichever pg_config appears first in the PATH.

Clearly, this isn't normally an issue. However, as I'm working on making it possible to install extensions against multiple major versions of PostgreSQL, this prevents the installation from doing the right thing.
Steps To Reproduce1. Call make as so: PG_CONFIG="/some/other/pg_config" make ...
2. make still calls $(which pg_config)
Additional InformationAttached is a patch that instructs make to only set PG_CONFIG if it hasn't already been set. Thereby allowing the Makefiles to respect the PG_CONFIG environment setting, but can fall back to $(which pg_config) when it isn't.
TagsNo tags attached.

Activities

TitanOfOld

2016-03-22 00:49

reporter  

pgpool-3.5.0-respect-pg-config-envvar.patch (2,217 bytes)
diff -aruw pgpool-II-3.5.0.orig/src/sql/Makefile pgpool-II-3.5.0/src/sql/Makefile
--- pgpool-II-3.5.0.orig/src/sql/Makefile	2016-02-10 03:53:31.000000000 -0500
+++ pgpool-II-3.5.0/src/sql/Makefile	2016-03-12 12:44:33.085835110 -0500
@@ -29,7 +29,7 @@
 top_builddir = ..
 
 ifdef USE_PGXS
-PG_CONFIG = pg_config
+PG_CONFIG ?= pg_config
 PGXS = $(shell $(PG_CONFIG) --pgxs)
 include $(PGXS)
 else
diff -aruw pgpool-II-3.5.0.orig/src/sql/pgpool_adm/Makefile pgpool-II-3.5.0/src/sql/pgpool_adm/Makefile
--- pgpool-II-3.5.0.orig/src/sql/pgpool_adm/Makefile	2016-02-10 03:54:49.000000000 -0500
+++ pgpool-II-3.5.0/src/sql/pgpool_adm/Makefile	2016-03-12 12:44:33.085835110 -0500
@@ -16,7 +16,7 @@
 top_builddir = ../..
 
 ifdef USE_PGXS
-PG_CONFIG = pg_config
+PG_CONFIG ?= pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)
 include $(PGXS)
 else
diff -aruw pgpool-II-3.5.0.orig/src/sql/pgpool_adm/Makefile.in pgpool-II-3.5.0/src/sql/pgpool_adm/Makefile.in
--- pgpool-II-3.5.0.orig/src/sql/pgpool_adm/Makefile.in	2016-02-10 03:53:31.000000000 -0500
+++ pgpool-II-3.5.0/src/sql/pgpool_adm/Makefile.in	2016-03-12 12:44:33.085835110 -0500
@@ -16,7 +16,7 @@
 top_builddir = ../..
 
 ifdef USE_PGXS
-PG_CONFIG = pg_config
+PG_CONFIG ?= pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)
 include $(PGXS)
 else
diff -aruw pgpool-II-3.5.0.orig/src/sql/pgpool-recovery/Makefile pgpool-II-3.5.0/src/sql/pgpool-recovery/Makefile
--- pgpool-II-3.5.0.orig/src/sql/pgpool-recovery/Makefile	2016-02-10 03:53:31.000000000 -0500
+++ pgpool-II-3.5.0/src/sql/pgpool-recovery/Makefile	2016-03-12 12:44:33.085835110 -0500
@@ -14,7 +14,7 @@
 top_builddir = ../..
 
 ifdef USE_PGXS
-PG_CONFIG = pg_config
+PG_CONFIG ?= pg_config
 PGXS = $(shell $(PG_CONFIG) --pgxs)
 include $(PGXS)
 else
diff -aruw pgpool-II-3.5.0.orig/src/sql/pgpool-regclass/Makefile pgpool-II-3.5.0/src/sql/pgpool-regclass/Makefile
--- pgpool-II-3.5.0.orig/src/sql/pgpool-regclass/Makefile	2016-02-10 03:53:31.000000000 -0500
+++ pgpool-II-3.5.0/src/sql/pgpool-regclass/Makefile	2016-03-12 12:44:33.085835110 -0500
@@ -14,7 +14,7 @@
 top_builddir = ../..
 
 ifdef USE_PGXS
-PG_CONFIG = pg_config
+PG_CONFIG ?= pg_config
 PGXS = $(shell $(PG_CONFIG) --pgxs)
 include $(PGXS)
 else

t-ishii

2016-03-30 11:34

developer   ~0000748

Last edited: 2016-03-30 11:35

View 2 revisions

This is not a place for discussions on feature enhancement.
Can you please move the discussion on this to the pgpool-II mailing list? (pgpool-hackers is preffered)

pengbo

2016-06-09 15:06

developer   ~0000852

comitted

https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=51653dfbc73269b2285466f5a259ad2b613ef0b0

Issue History

Date Modified Username Field Change
2016-03-22 00:49 TitanOfOld New Issue
2016-03-22 00:49 TitanOfOld File Added: pgpool-3.5.0-respect-pg-config-envvar.patch
2016-03-23 13:12 t-ishii Assigned To => t-ishii
2016-03-23 13:12 t-ishii Status new => assigned
2016-03-30 11:34 t-ishii Note Added: 0000748
2016-03-30 11:35 t-ishii Note Edited: 0000748 View Revisions
2016-03-30 11:35 t-ishii Status assigned => feedback
2016-06-09 15:06 pengbo Note Added: 0000852
2016-06-09 15:06 pengbo Status feedback => resolved