Hi I have PostgreSQL 12 installed by homebrew and I clone the pg_partman at this commit https://github.com/pgpartman/pg_partman/commit/63328c5bd1f8009fc95592fcdd8ff45f148829e6.
In the cloned folder, I ran make install
but it says:
(pg_partman) git:(master) $ make install
cat sql/types/types.sql sql/tables/tables.sql sql/functions/apply_cluster.sql sql/functions/apply_constraints.sql sql/functions/apply_foreign_keys.sql sql/functions/apply_privileges.sql sql/functions/apply_publications.sql sql/functions/autovacuum_off.sql sql/functions/autovacuum_reset.sql sql/functions/check_control_type.sql sql/functions/check_default.sql sql/functions/check_name_length.sql sql/functions/check_subpart_sameconfig.sql sql/functions/check_subpartition_limits.sql sql/functions/create_function_id.sql sql/functions/create_function_time.sql sql/functions/create_parent.sql sql/functions/create_partition_id.sql sql/functions/create_partition_time.sql sql/functions/create_sub_parent.sql sql/functions/create_trigger.sql sql/functions/drop_constraints.sql sql/functions/drop_partition_column.sql sql/functions/drop_partition_id.sql sql/functions/drop_partition_time.sql sql/functions/dump_partition_table_definition.sql sql/functions/inherit_template_properties.sql sql/functions/partition_data_id.sql sql/functions/partition_data_time.sql sql/functions/partition_gap_fill.sql sql/functions/reapply_privileges.sql sql/functions/run_maintenance.sql sql/functions/show_partition_info.sql sql/functions/show_partition_name.sql sql/functions/show_partitions.sql sql/functions/stop_sub_partition.sql sql/functions/undo_partition.sql sql/procedures/partition_data_proc.sql sql/procedures/reapply_constraints_proc.sql sql/procedures/run_maintenance_proc.sql sql/procedures/undo_partition_proc.sql > sql/pg_partman--4.4.1.sql
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I. -I./ -I/usr/local/opt/postgresql@12/include/server -I/usr/local/opt/postgresql@12/include/internal -I/usr/local/Cellar/icu4c/67.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -c -o src/pg_partman_bgw.o src/pg_partman_bgw.c
src/pg_partman_bgw.c:10:10: fatal error: 'postgres.h' file not found
#include "postgres.h"
^~~~~~~~~~~~
1 error generated.
make: *** [src/pg_partman_bgw.o] Error 1
A quick investigations suggest installing postgresql-server-dev-12, but I cant find anything relevant for macOS.
Any idea what am I missing? Thanks in advance!
Or use this custom homebrew formula from https://github.com/sj26/homebrew-postgresql-extensions/:
Then follow the instructions to edit postgresql conf.