Avoid symbol conflict causing segfault when pg_statsinfo is installed.
Control symbol visibility for functions exported in the pg_repack shared library, to avoid symbol conflicts with other libraries, particularly those which may be loaded via shared_preload_libraries and use conflicting function definitions of our common pgut code, such as pg_statsinfo. Verified this fix on my Debian x86_64 machine with PostgreSQL 9.4 and pg_statsinfo 3.0.2. Would be nice to test this fix on a few other platforms such as OS X, though I had some difficulty getting pg_statsinfo to build on OS X. Hopefully closes Issue #43, thanks to bwtakacy for the report and demonstration of the commited fix in pg_reorg.
This commit is contained in:
		| @ -17,6 +17,8 @@ MODULE_big = $(EXTENSION) | ||||
|  | ||||
| OBJS = repack.o pgut/pgut-be.o pgut/pgut-spi.o | ||||
|  | ||||
| SHLIB_EXPORTS = exports.txt | ||||
|  | ||||
| # The version number of the program. It should be the same of the library. | ||||
| REPACK_VERSION = $(shell grep '"version":' ../META.json | head -1 \ | ||||
| 	| sed -e 's/[ 	]*"version":[ 	]*"\(.*\)",/\1/') | ||||
|  | ||||
							
								
								
									
										19
									
								
								lib/exports.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								lib/exports.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| Pg_magic_func                      1 | ||||
| pg_finfo_repack_apply              2 | ||||
| pg_finfo_repack_disable_autovacuum 3 | ||||
| pg_finfo_repack_drop               4 | ||||
| pg_finfo_repack_get_order_by       5 | ||||
| pg_finfo_repack_indexdef           6 | ||||
| pg_finfo_repack_swap               7 | ||||
| pg_finfo_repack_trigger            8 | ||||
| pg_finfo_repack_version            9 | ||||
| pg_finfo_repack_index_swap        10 | ||||
| repack_apply                      11 | ||||
| repack_disable_autovacuum         12 | ||||
| repack_drop                       13 | ||||
| repack_get_order_by               14 | ||||
| repack_indexdef                   15 | ||||
| repack_swap                       16 | ||||
| repack_trigger                    17 | ||||
| repack_version                    18 | ||||
| repack_index_swap                 19 | ||||
		Reference in New Issue
	
	Block a user