Re: [GENERAL] Monitoring Tool for PostgreSQL
On 18/10/2017 18:37, Fabricio Pedroso Jorge wrote: Hi all, is there a "official" monitoring tool for PostgreSQL databases? For example, i come from Oracle Database, and there, we have Enterprise Manager to monitor and administrer the product... is there such a similar tool for PostgreSQL? Thanks for the attention. Not an 'official' tool, but if you're familiar with OEM then EnterpriseDB does PostgreSQL Enterprise Manager. https://www.enterprisedb.com/products/edb-postgres-platform/edb-postgres-enterprise-managerpem -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotion to application level ...
On 15/06/2017 05:27, Andreas Kretschmer wrote: Am 15.06.2017 um 01:18 schrieb Martin Goodson: I'm just wondering how people may have implemented this. Do people setup pgbouncer nodes on the database servers themselves, on application servers, in the middle tier between the application and database, and so forth, or some combination of the three? I can think of some advantages or drawbacks for each. Or do people find that repmgr works better with other tools to handle the promotion notification outside the database cluster? Basically I'm new to this, and I'm wondering how folks have handled this issue. I'm basically looking for the community's wisdom :) Usually we recommend to install pgbouncer on the app-servers. If you have full control of the application you can try to integrate the logic into the application (provide a list of servers, the new pg10-version of libpg is working similar in this way: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=274bb2b3857cc987cfa21d14775cae9b0dababa5 https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=721f7bd3cbccaf8c07cad2707826b83f84694832 ) Regards, Andreas Hello. Unfortunately, no control of the application layer. Very interesting feedback so far. Thanks, everyone! The issues I think I would have with pgbouncer at the application level is ... 1) What if an application server is down when pgbouncer tries to update where the database IP is pointing to? When it is brought back into service could that create a split-brain scenario if it's still pointing to the old master? Since the only STONITH here is 'I've told you to talk to server X instead of server Y' what happens if somebody doesn't get that message and the old master is still up and about (e.g. the failover was caused by a transient error such as a power issue or network issue that the 'old master' was able to quickly recover from and come back online)? :) 2) We use a non-trivial number of application servers. Could that create 'failover lag' due to the amount of time it takes to notify all the pgbouncers to stop, change IP, and restart? 3) Since we use a non-trivial number of application servers, the administrative overhead of pushing all user password changes up to each pgbouncer could be a bit of a pain (candidate for an automation tool like ansible, perhaps?) How do people deal with that? Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotion to application level ...
On 14/06/2017 19:54, Rory Campbell-Lange wrote: On 14/06/17, Martin Goodson (kaema...@googlemail.com) wrote: The new master's repmgr promote script will execute commands to pause pgbouncer, reconfigure pgbouncer to point to the new database address, and then resume. You could just move the service ip address at the new postgresql master to which the pgbouncer instances on each app server could reconnect. I assume, with reference to https://github.com/2ndQuadrant/repmgr, that you could use repmgrd to trigger a script to do just that at "switchover", possibly something you would need to monitor the "repl_events" table to achieve. Rory Well, yes. That's pretty much the plan. See the repmgr documents: https://github.com/2ndQuadrant/repmgr/blob/master/docs/repmgrd-node-fencing.md - In a failover situation, repmgrd promotes a standby to master by executing the command defined in promote_command. Normally this would be something like: repmgr standby promote -f /etc/repmgr.conf By wrapping this in a custom script which adjusts the pgbouncer configuration on all nodes, it's possible to fence the failed master and redirect write connections to the new master. I'm just wondering how people may have implemented this. Do people setup pgbouncer nodes on the database servers themselves, on application servers, in the middle tier between the application and database, and so forth, or some combination of the three? I can think of some advantages or drawbacks for each. Or do people find that repmgr works better with other tools to handle the promotion notification outside the database cluster? Basically I'm new to this, and I'm wondering how folks have handled this issue. I'm basically looking for the community's wisdom :) -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Repmgr + pgbouncer - Notification of master promotion to application level ...
Hello. Currently we're running all our PostgreSQL databases on ESX Stretch Clusters, but our company is looking at moving away from those to a private cloud solution. I'm informed that, going forward, new servers provisioned for us to install PostgreSQL databases on will be entirely isolated, using no network/clustered storage of any kind but only local storage - so stretch clusters, VCS etc are out. To this end we're looking at using standard PostgreSQL replication/multiple nodes to provide continued availability in the event of a primary server failure, and I've been directed to set-up some three node testbeds. It was originally suggested we use Pacemaker/Corosync for this, but then our Linux sysadm team advised that Pacemaker/Corosync hadn't been certified for our particular cloud solution, and a VIP couldn't be done as the database servers may exist on different networks/availability zones. (BTW, I apologize if somebody reading this is going 'What nonsense! Of course it will work! Here's how ...' - I'm no sysadm, I'm just going on what I was told) As a backup/contingency plan I'm now using repmgr to handle things - I'm very happy with it (after getting it compiled :) ) it seems nice and simple, and repmgrd is working nicely. A number of test failovers have worked perfectly. BUT ... repmgr doesn't provide a mechanism to notify upstream connections that a failover has occurred and that the master is now on server y instead of server x. I'm currently looking at pgbouncer, as that's proposed as a STONITH mechanism in the repmgr git documentation. The new master's repmgr promote script will execute commands to pause pgbouncer, reconfigure pgbouncer to point to the new database address, and then resume. This seems like a straightforward and viable option, except that if we only have one pgbouncer we've just introduced a new single point of failure, and if we have multiple pgbouncers how best to handle that? A pgbouncer on every application server, two or three pgbouncers in the middle with some kind of load balancer, a pgbouncer on every db server? Each option appears to have advantages and drawbacks. So I was just wondering if the community had any recommendations/suggestions/gotchas for this? Is pgbouncer a decent choice, or are there better solutions out there? Has anyone tried pgbouncer and found it worked well, or tried it and found it was a disaster and moved onto something else? Basically, I'm wondering if I'm on the right path or whether there's something out there that everyone is now screaming 'Why on earth is this idiot not using X instead?' :) Any input would be greatly appreciated. Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 18/05/2017 15:20, Adrian Klaver wrote: If I remove that link then I can compile. Have no idea why. Hi! OP here, and here's the feedback on what I'm getting after unlinking as suggested yesterday: I tried removing/unlinking as suggested and, just like Adrian, it worked OK for me! :) The advice was: Whoever does it needs to unlink: /lib64/libldap_r-2.4.so.2 So that's what I did. Output of ls -l command: lrwxrwxrwx 1 root root 23 May 11 12:42 /lib64/libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.10.3 Unlink the file: $ sudo unlink /lib64/libldap_r-2.4.so.2 Verify gone: $ ls -l /lib64/libldap_r-2.4.so.2 ls: cannot access /lib64/libldap_r-2.4.so.2: No such file or directory Attempt build again: $ PATH=/db_demo/app/postgres/9.6.2-3/bin:$PATH make USE_PGXS=1 clean all No errors this time! It worked, except for the following warning we've seen before: /bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 Moving onto the install (didn't need sudo, as the userid I'm using is the owner of the PostgreSQL software): $ PATH=/db_demo/app/postgres/9.6.2-3/bin:$PATH make USE_PGXS=1 install make -C sql make[1]: Entering directory `/home/pginst/repmgr-3.3.1/sql' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/pginst/repmgr-3.3.1/sql' /bin/mkdir -p '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib' mkdir -p '/db_demo/app/postgres/9.6.2-3/bin' /usr/bin/install -c repmgrd '/db_demo/app/postgres/9.6.2-3/bin/' /usr/bin/install -c repmgr '/db_demo/app/postgres/9.6.2-3/bin/' make -C sql install make[1]: Entering directory `/home/pginst/repmgr-3.3.1/sql' /bin/mkdir -p '/db_demo/app/postgres/9.6.2-3/lib/postgresql' /bin/mkdir -p '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib' /usr/bin/install -c -m 755 repmgr_funcs.so '/db_demo/app/postgres/9.6.2-3/lib/postgresql/repmgr_funcs.so' /usr/bin/install -c -m 644 .//uninstall_repmgr_funcs.sql repmgr_funcs.sql '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib/' make[1]: Leaving directory `/home/pginst/repmgr-3.3.1/sql' /usr/bin/install -c -m 644 .//repmgr.sql .//uninstall_repmgr.sql '/db_demo/app/postgres/9.6.2-3/share/postgresql/contrib/' Seems to have worked OK! I went looking within the postgresql tree to see if it had built anything: $ find . -name *repmgr* -print ./lib/postgresql/repmgr_funcs.so ./share/contrib/repmgr.sql ./share/contrib/repmgr_funcs.sql ./share/contrib/uninstall_repmgr_func.sql ./share/contrib/uninstall_repmgr.sql ./share/contrib/uninstall_repmgr_funcs.sql ./share/postgresql/contrib/repmgr.sql ./share/postgresql/contrib/repmgr_funcs.sql ./share/postgresql/contrib/uninstall_repmgr.sql ./share/postgresql/contrib/uninstall_repmgr_funcs.sql ./bin/repmgr ./bin/repmgrd Success! I then relinked the library: $ sudo ln -s /lib64/libldap_r-2.4.so.2.10.3 /lib64/libldap_r-2.4.so.2 $ ls -l the file to see if it's back: lrwxrwxrwx 1 root root 30 May 18 15:51 /lib64/libldap_r-2.4.so.2 -> /lib64/libldap_r-2.4.so.2.10.3 Try executing the command from the database owner id: $ repmgr -V repmgr 3.3.1 (PostgreSQL 9.6.2) Didn't barf, so hopefully relinking the file makes no difference to the already compiled repmgr :) Bit of a mystery still on that linking/unlinking (if we can find a way to avoid doing that, that would be great) but success! Now I get to start playing with it properly - but I'm relatively confident that should be OK, I was getting good results on my little ubuntu box at home ... Of course, I said the same think about compiling it :) Huge thanks to EVERYONE who helped on this! If anyone is going to be at PG Day UK, I'll buy you a drink :) Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 17/05/2017 20:11, Adrian Klaver wrote: I thought you where working on VM you had access/rights to. That is not the case? I have sudo access on the redhat box we're working on so technically I could do this, yup. But whilst our Unix team are happy for us to do whatever the heck we like within our own domain (so to speak - all the databases, tools we use, etc), they prefer to retain control over 'top level' system-admin stuff like disks, the contents of /lib, etc. I like to keep our sysadmins happy, so I'm going to leave /lib to them :) Whoever does it needs to unlink: /lib64/libldap_r-2.4.so.2 Got it. We'll see what happens tomorrow. Thank you for all the help so far, it's been *invaluable*. Hopefully tomorrow I'll have some good news to report! btw, if this is a reproducible thing is it worth raising with enterprisedb or 2nd Quadrant? Is this a 'bug' of some kind, or just a really weird edge case? :) Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 17/05/2017 17:19, Adrian Klaver wrote: Spun up a RH 7.3 instance and tried the compile and got the same error. Good to know it's reproducible, and not just me :) To fix, find the checking library in /lib64/libldap_r-2.4.so.2. [root@localhost repmgr-2.0]# cd /lib64/ [root@localhost lib64]# ls -l libldap* lrwxrwxrwx. 1 root root 20 Dec 8 09:23 libldap-2.4.so.2 -> libldap-2.4.so.2.5.6 -rwxr-xr-x. 1 root root 317200 Apr 29 2013 libldap-2.4.so.2.5.6 lrwxrwxrwx. 1 root root 22 Dec 8 09:23 libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.5.6 -rwxr-xr-x. 1 root root 335264 Apr 29 2013 libldap_r-2.4.so.2.5.6 Ok, there are two copies, retain one and unlink other. [root@localhost lib64]# unlink libldap_r-2.4.so.2 " I did the above and success: PATH=/opt/PostgreSQL/9.6/bin:$PATH make USE_PGXS=1 clean all ... I am going to agree with John's comment upstream that unlinking a file seems to be dubious. You might want to try linking the file back up again after you have installed repmgr and see if it causes any issues. I'll have a word with our UNIX team about unlinking this (and relinking afterward) tomorrow (they're gone for the night ... :) ) and report back, but it certainly is looking promising again! :) Here's what I currently see in /lib64 for libldap files ... $ ls -l /lib64/libldap* lrwxrwxrwx 1 root root 21 May 11 12:42 /lib64/libldap-2.4.so.2 -> libldap-2.4.so.2.10.3 -rwxr-xr-x 1 root root 337K Feb 23 2016 /lib64/libldap-2.4.so.2.10.3 lrwxrwxrwx 1 root root 23 May 11 12:42 /lib64/libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.10.3 -rwxr-xr-x 1 root root 365K Feb 23 2016 /lib64/libldap_r-2.4.so.2.10.3 lrwxrwxrwx 1 root root 23 May 16 17:06 /lib64/libldap_r.so -> libldap_r-2.4.so.2.10.3 lrwxrwxrwx 1 root root 21 May 16 17:06 /lib64/libldap.so -> libldap-2.4.so.2.10.3 Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 17/05/2017 16:15, Adrian Klaver wrote: On 05/17/2017 07:26 AM, Martin Goodson wrote: On 16/05/2017 18:46, Adrian Klaver wrote: Per Tom's suggestion try ldd /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 Hello. Apologies for the delay in replying - medical appointment this morning :) Anyway, executed that command as suggested and this is the output I got. pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ls -lrt *ldap* -rwxr-xr-x 1 pginst gpginst 354K Mar 13 11:25 libldap-2.4.so.2 -rwxr-xr-x 1 pginst gpginst 383K Mar 13 11:25 libldap_r-2.4.so.2 pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ldd libldap_r-2.4.so.2 linux-vdso.so.1 => (0x7ffcd12e4000) liblber-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/./liblber-2.4.so.2 (0x7f20ff9a1000) libresolv.so.2 => /lib64/libresolv.so.2 (0x7f20ff77d000) libsasl2.so.3 => /db_demo/app/postgres/9.6.2-3/lib/./libsasl2.so.3 (0x7f20ff55b000) libssl.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libssl.so.1.0.0 (0x7f20ff2ec000) libcrypto.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libcrypto.so.1.0.0 (0x7f20feeb5000) libpthread.so.0 => /lib64/libpthread.so.0 (0x7f20fec99000) libc.so.6 => /lib64/libc.so.6 (0x7f20fe8d7000) libdl.so.2 => /lib64/libdl.so.2 (0x7f20fe6d2000) /lib64/ld-linux-x86-64.so.2 (0x7f20ffe14000) So the EDB install is using its own library for liblber Per Tom's suggestion: nm -D /db_demo/app/postgres/9.6.2-3/lib/liblber-2.4.so.2 Output from that is: $ nm -D /db_demo/app/postgres/9.6.2-3/lib/liblber-2.4.so.2 U __assert_fail 7dd9 T ber_alloc 7d48 T ber_alloc_t 90b2 T ber_bprint a76c T ber_bvarray_add a611 T ber_bvarray_add_x a4df T ber_bvarray_dup_x a4c0 T ber_bvarray_free a441 T ber_bvarray_free_x 9ea6 T ber_bvdup 9d1f T ber_bvecadd 9bdc T ber_bvecadd_x 9bbd T ber_bvecfree 9b3d T ber_bvecfree_x 9b1e T ber_bvfree 9acb T ber_bvfree_x a417 T ber_bvreplace a32a T ber_bvreplace_x 34ac T ber_decode_oid 937a T ber_dump 7df9 T ber_dup 9e7c T ber_dupbv 9d49 T ber_dupbv_x 5e06 T ber_encode_oid 8cb0 T ber_errno_addr 8cda T ber_error_print 4621 T ber_first_element 8244 T ber_flatten 80e1 T ber_flatten2 7b01 T ber_flush 7b33 T ber_flush2 7abd T ber_free 7a3a T ber_free_buf 4455 T ber_get_bitstringa 45fc T ber_get_boolean 3b4b T ber_get_enum 3a65 T ber_get_int 83a0 T ber_get_next 45c1 T ber_get_null a798 T ber_get_option 42ae T ber_get_stringa 4374 T ber_get_stringal 4311 T ber_get_stringa_null 3b70 T ber_get_stringb 404b T ber_get_stringbv 4178 T ber_get_stringbv_null 3800 T ber_get_tag 801e T ber_init 7f06 T ber_init2 7ff9 T ber_init_w_nullc 0020fb28 B ber_int_errno_fn 0020fb18 B ber_int_log_proc 0020fb40 B ber_int_memory_fns 0020fb60 B ber_int_options b8a6 T ber_int_sb_close b93c T ber_int_sb_destroy b7ea T ber_int_sb_init b9f9 T ber_int_sb_read bb03 T ber_int_sb_write 8c07 T ber_len 9049 T ber_log_bprint 92e8 T ber_log_dump 94c5 T ber_log_sos_dump a15a T ber_mem2bv a03c T ber_mem2bv_x 98ed T ber_memalloc 986e T ber_memalloc_x 99a8 T ber_memcalloc 990c T ber_memcalloc_x 97c0 T ber_memfree 9730 T ber_memfree_x 9aa1 T ber_memrealloc 99d2 T ber_memrealloc_x 984f T ber_memvfree 97df T ber_memvfree_x 46cb T ber_next_element 3835 T ber_peek_element 39d3 T ber_peek_tag 6aa0 T ber_printf 8c29 T ber_ptrlen 636a T ber_put_berval 6444 T ber_put_bitstring 65d1 T ber_put_boolean 6218 T ber_put_enum 6251 T ber_put_int 6558 T ber_put_null 628a T ber_put_ostring 6a6c T ber_put_seq 6a86 T ber_put_set 63dc T ber_put_string 0020fb20 B ber_pvt_err_file 8da3 T ber_pvt_log_output 0020f9e0 D ber_pvt_log_print 8f14 T ber_pvt_log_printf 0020fba0 B ber_pvt_opt_on b41c T ber_pvt_sb_buf_destroy b3e3 T ber_pvt_sb_buf_init b52c T ber_pvt_sb_
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 16/05/2017 18:46, Adrian Klaver wrote: Per Tom's suggestion try ldd /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 Hello. Apologies for the delay in replying - medical appointment this morning :) Anyway, executed that command as suggested and this is the output I got. pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ls -lrt *ldap* -rwxr-xr-x 1 pginst gpginst 354K Mar 13 11:25 libldap-2.4.so.2 -rwxr-xr-x 1 pginst gpginst 383K Mar 13 11:25 libldap_r-2.4.so.2 pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ldd libldap-2.4.so.2 linux-vdso.so.1 => (0x7fff47db7000) liblber-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/./liblber-2.4.so.2 (0x7f88934f) libresolv.so.2 => /lib64/libresolv.so.2 (0x7f88932cc000) libsasl2.so.3 => /db_demo/app/postgres/9.6.2-3/lib/./libsasl2.so.3 (0x7f88930aa000) libssl.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libssl.so.1.0.0 (0x7f8892e3b000) libcrypto.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libcrypto.so.1.0.0 (0x7f8892a04000) libc.so.6 => /lib64/libc.so.6 (0x7f8892642000) libdl.so.2 => /lib64/libdl.so.2 (0x7f889243e000) /lib64/ld-linux-x86-64.so.2 (0x7f8893959000) pginst@testdemo00:/db_demo/app/postgres/9.6.2-3/lib$ ldd libldap_r-2.4.so.2 linux-vdso.so.1 => (0x7ffcd12e4000) liblber-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/./liblber-2.4.so.2 (0x7f20ff9a1000) libresolv.so.2 => /lib64/libresolv.so.2 (0x7f20ff77d000) libsasl2.so.3 => /db_demo/app/postgres/9.6.2-3/lib/./libsasl2.so.3 (0x7f20ff55b000) libssl.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libssl.so.1.0.0 (0x7f20ff2ec000) libcrypto.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/./libcrypto.so.1.0.0 (0x7f20feeb5000) libpthread.so.0 => /lib64/libpthread.so.0 (0x7f20fec99000) libc.so.6 => /lib64/libc.so.6 (0x7f20fe8d7000) libdl.so.2 => /lib64/libdl.so.2 (0x7f20fe6d2000) /lib64/ld-linux-x86-64.so.2 (0x7f20ffe14000) (I noticed there was a second file in there with roughly the same name ... ish. Just in case it might be relevent, I did that one too :) ) Hope that info's helpful! Regards, Martin. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 16/05/2017 16:39, Martin Goodson wrote: On 16/05/2017 15:58, Adrian Klaver wrote: /bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' collect2: error: ld returned 1 exit status make: *** [repmgrd] Error 1 Not sure what is going on here. My usual reaction to a message like this when compiling is to install the --devel package for the library involved. In this case I believe it would be something like: openldap2-devel OK, thank you. I'll pass that along to our UNIX team and ask for that to be installed, see what we get ... This is just an off the top of the head suggestion, no warranty:) What? You mean I can't get my money back? :) Many thanks for all the help so far. It's been very, very, helpful. I'm sure it's nearly there ... Drat. Didn't work. openldap2-devel was installed OK, reran the make, got the same error :( Here's what's installed according to rpm -qa openldap-devel-2.4.40-9.e17_2.x86_64 openldap-2.4.40.9.e17_2.x86_64 Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 16/05/2017 15:58, Adrian Klaver wrote: For completeness what does: ls -al /usr/lib64/libssl.so show? (Trimming things down a bit to keep things a little bit more readable, now we've got the package dependencies issue sorted. Hopefully. Hope that's OK?) I can see the following: $ ls -l /usr/lib64/libssl.so lrwxrwxrwx 1 root root 16 May 15 16:57 /usr/lib64/libssl.so -> libssl.so.1.0.1e Just to expand on that a bit : $ ls -l /usr/lib64/libssl.* lrwxrwxrwx 1 root root 16 May 15 16:57 /usr/lib64/libssl.so -> libssl.so.1.0.1e lrwxrwxrwx 1 root root 16 May 11 12:41 /usr/lib64/libssl.so.10 -> libssl.so.1.0.1e -rwxr-xr-x 1 root root 440K Sep 22 2016 /usr/lib64/libssl.so.1.0.1e Ah, sorry. A bit got truncated. Here you go: /bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' collect2: error: ld returned 1 exit status make: *** [repmgrd] Error 1 Not sure what is going on here. My usual reaction to a message like this when compiling is to install the --devel package for the library involved. In this case I believe it would be something like: openldap2-devel OK, thank you. I'll pass that along to our UNIX team and ask for that to be installed, see what we get ... This is just an off the top of the head suggestion, no warranty:) What? You mean I can't get my money back? :) Many thanks for all the help so far. It's been very, very, helpful. I'm sure it's nearly there ... Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 16/05/2017 14:42, Adrian Klaver wrote: On 05/16/2017 04:36 AM, Martin Goodson wrote: On 15/05/2017 00:17, Martin Goodson wrote: Tomorrow I'll have to see about getting that set-up on an RHEL 7 box :) Thank you so much, everybody, for your help! It's been invaluable! Regards, Martin. *Sigh*. And things were going so well. With Adrian and Devrim's help I was able to get repmgr compiled on my little ubuntu box at home, and I cheerfully went into work on Monday all ready to get things compiled nicely. I forwarded Devrim's list of redhat/CentOS packages needed to my Unix support colleagues, who installed the libraries listed. I've now got nothing telling me such and such is missing. I now have this instead: That list would be: systemd libxslt-devel pam-devel openssl-devel readline-devel libmemcached-devel libicu-devel Did you also install?: krb5-devel libedit-devel Hi. This is what I see: $ rpm -qa | grep -i -e "systemd" -e "devel" systemd-sysv-219-19.el7_2.20.x86_64 keyutils-libs-devel-1.5.8-3.el7.x86_64 krb5-devel-1.13.2-12.el7_2.x86_64 readline-devel-6.2-9.el7.x86_64 libicu-devel-50.1.2-15.el7.x86_64 libgpg-error-devel-1.12-3.el7.x86_64 libxslt-devel-1.1.28-5.el7.x86_64 systemd-libs-219-19.el7_2.20.x86_64 libedit-devel-3.0-12.20121213cvs.el7.x86_64 pam-devel-1.1.8-12.el7_1.1.x86_64 pcre-devel-8.32-15.el7_2.1.x86_64 libsepol-devel-2.1.9-3.el7.x86_64 libverto-devel-0.2.5-4.el7.x86_64 zlib-devel-1.2.7-15.el7.x86_64 ncurses-devel-5.9-13.20130511.el7.x86_64 libgcrypt-devel-1.5.3-12.el7_1.1.x86_64 libxml2-devel-2.9.1-6.el7_2.3.x86_64 libmemcached-devel-1.0.16-5.el7.x86_64 systemd-219-19.el7_2.20.x86_64 libcom_err-devel-1.42.9-7.el7.x86_64 libselinux-devel-2.2.2-6.el7.x86_64 openssl-devel-1.0.1e-51.el7_2.7.x86_64 glibc-devel-2.17-106.el7_2.8.x86_64 xz-devel-5.1.2-12alpha.el7.x86_64cyrus-sasl-devel-2.1.26-20.el7_2.x86_64 So it looks like I've got pretty much everything covered in that respect? :) What does ldd /db_demo/app/postgres/9.6.2-3/lib/libpq.so show? I get the following: linux-vdso.so.1 => (0x7ffd631ae000) libssl.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/libssl.so.1.0.0 (0x7f1002aa1000) libcrypto.so.1.0.0 => /db_demo/app/postgres/9.6.2-3/lib/libcrypto.so.1.0.0 (0x7f100266a000) libgssapi_krb5.so.2 => /db_demo/app/postgres/9.6.2-3/lib/libgssapi_krb5.so.2 (0x7f100241) libldap_r-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/libldap_r-2.4.so.2 (0x7f10021ae000) libpthread.so.0 => /lib64/libpthread.so.0 (0x7f1001f88000) libc.so.6 => /lib64/libc.so.6 (0x7f1001bc6000) libdl.so.2 => /lib64/libdl.so.2 (0x7f10019c2000) libkrb5.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libkrb5.so.3 (0x7f10016cc000) libk5crypto.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libk5crypto.so.3 (0x7f1001486000) libcom_err.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libcom_err.so.3 (0x7f1001283000) libkrb5support.so.0 => /db_demo/app/postgres/9.6.2-3/lib/libkrb5support.so.0 (0x7f1001075000) libresolv.so.2 => /lib64/libresolv.so.2 (0x7f1000e5b000) liblber-2.4.so.2 => /db_demo/app/postgres/9.6.2-3/lib/liblber-2.4.so.2 (0x7f1000c4b000) libsasl2.so.3 => /db_demo/app/postgres/9.6.2-3/lib/libsasl2.so.3 (0x7f1000a28000) /lib64/ld-linux-x86-64.so.2 (0x7f1002f3f000) whereis libssl.so For that I get the following: libssl: /usr/lib64/libssl3.so /usr/lib64/libssl.so /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' Is that the end of the messages or are there more after the above? Ah, sorry. A bit got truncated. Here you go: /bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' collect2: error: ld returned 1 exit status make: *** [repmgrd] Error 1 So above when you said your colleagues installed the packages for you, was that on the host or the virtual machine? All installed on the virtual machine I'm building this on. See the rpm list above. At my level of visibility it's just 'another server' - I just mentioned it was a virtual one rather than an actual bit of tin in case it were to somehow make a difference. Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 4 - compilation issues on RHEL 7.2
On 15/05/2017 00:17, Martin Goodson wrote: Tomorrow I'll have to see about getting that set-up on an RHEL 7 box :) Thank you so much, everybody, for your help! It's been invaluable! Regards, Martin. *Sigh*. And things were going so well. With Adrian and Devrim's help I was able to get repmgr compiled on my little ubuntu box at home, and I cheerfully went into work on Monday all ready to get things compiled nicely. I forwarded Devrim's list of redhat/CentOS packages needed to my Unix support colleagues, who installed the libraries listed. I've now got nothing telling me such and such is missing. I now have this instead: $ PATH=/db_demo/app/postgres/9.6.2-3/bin:$PATH make USE_PGXS=1 clean all rm -f *.o rm -f repmgrd rm -f repmgr make -C sql clean make[1]: Entering directory `/home/pginst/repmgr-3.3.1/sql' rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc rm -f repmgr_funcs.sql rm -f repmgr_funcs.o make[1]: Leaving directory `/home/pginst/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dbutils.o dbutils.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o config.o config.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgrd.o repmgrd.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o log.o log.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/db_demo/app/postgres/9.6.2-3/include -I. -I./ -I/db_demo/app/postgres/9.6.2-3/include/postgresql/server -I/db_demo/app/postgres/9.6.2-3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o strutil.o strutil.c gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 dbutils.o config.o repmgrd.o log.o strutil.o -L/db_demo/app/postgres/9.6.2-3/lib -lpgcommon -lpgport -L/db_demo/app/postgres/9.6.2-3/lib -lpq -L/db_demo/app/postgres/9.6.2-3/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/db_demo/app/postgres/9.6.2-3/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm /bin/ld: warning: libssl.so.1.0.0, needed by /db_demo/app/postgres/9.6.2-3/lib/libpq.so, may conflict with libssl.so.10 /lib64/libldap_r-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' I've forwarded that to our UNIX support team, just in case this is some manner of known issue - and they've come back today saying, essentially, we got nothing :) FWIW, I'm trying this on a tiny virtual development server running RHEL 7.2 with 2 cpus and 4gb of RAM. PostgreSQL was built using the EnterpriseDB installer and is in /db_demo/app/postgres/9.6.2-3. Any ideas? Is this a new thing, an existing issue that's popped up before, or (yet again! :) ) a case of me missing something that is blindingly obvious to everyone else? Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it."
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
_funcs.sql.in >repmgr_funcs.sql make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o check_dir.o check_dir.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o repmgr.o repmgr.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o dirmod.o dirmod.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 -I/opt/PostgreSQL/9.6.3/include -I. -I./ -I/opt/PostgreSQL/9.6.3/include/postgresql/server -I/opt/PostgreSQL/9.6.3/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o compat.o compat.c gcc -o repmgr -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 dbutils.o check_dir.o config.o repmgr.o log.o strutil.o dirmod.o compat.o -L/opt/PostgreSQL/9.6.3/lib -lpgcommon -lpgport -L/opt/PostgreSQL/9.6.3/lib -lpq -L/opt/PostgreSQL/9.6.3/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/opt/PostgreSQL/9.6.3/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm make -C sql make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' 29. sudo PATH=/opt/PostgreSQL/9.6.3/bin:$PATH make USE_PGXS=1 install make -C sql make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' /bin/mkdir -p '/opt/PostgreSQL/9.6.3/share/postgresql/contrib' mkdir -p '/opt/PostgreSQL/9.6.3/bin' /usr/bin/install -c repmgrd '/opt/PostgreSQL/9.6.3/bin/' /usr/bin/install -c repmgr '/opt/PostgreSQL/9.6.3/bin/' make -C sql install make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' /bin/mkdir -p '/opt/PostgreSQL/9.6.3/lib/postgresql' /bin/mkdir -p '/opt/PostgreSQL/9.6.3/share/postgresql/contrib' /usr/bin/install -c -m 755 repmgr_funcs.so '/opt/PostgreSQL/9.6.3/lib/postgresql/repmgr_funcs.so' /usr/bin/install -c -m 644 .//uninstall_repmgr_funcs.sql repmgr_funcs.sql '/opt/PostgreSQL/9.6.3/share/postgresql/contrib/' make[1]: Leaving directory '/home/master/repmgr-3.3.1/sql' /usr/bin/install -c -m 644 .//repmgr.sql .//uninstall_repmgr.sql '/opt/PostgreSQL/9.6.3/share/postgresql/contrib/' Tomorrow I'll have to see about getting that set-up on an RHEL 7 box :) Thank you so much, everybody, for your help! It's been invaluable! Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
On 14/05/2017 19:26, Devrim Gündüz wrote: Hi Martin, On Fri, 2017-05-12 at 16:13 +0100, Martin Goodson wrote: /usr/bin/ld: cannot find -lselinux /usr/bin/ld: cannot find -lssl /usr/bin/ld: cannot find -lcrypto /usr/bin/ld: cannot find -lgssapi_krb5 /usr/bin/ld: cannot find -lz collect2: error: ld returned 1 exit status Makefile:20: recipe for target 'repmgrd' failed make: *** [repmgrd] Error 1 I just tested this on my CentOS 7 box -- FWIW, you need to following dependencies (these are CentOS/RHEL package names, you can find their Ubuntu equivalents easily): systemd libxslt-devel pam-devel openssl-devel readline-devel libmemcached-devel libicu-devel Once you install their equivalent, you'll be able to compile repmgr against EPAS 9.6. (Hint: Last time I used Ubuntu/Debian, their package names ended with -dev for the development packages) Regards, Hello. Many thanks to yourself and Adrian for responding, it's very much appreciated. I've only got access to Ubuntu at home, which is what I've been trying to get this compiled against over the weekend. I wasn't getting very far with it on our actual RHEL 7 boxes at work, and didn't want to stick around the office until midnight and throughout the weekend :) As Adrian pointed out, I was just about able to overcome the missing lib dependencies and progressed further, wherein I came across the following messages: gcc -o repmgrd -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 dbutils.o config.o repmgrd.o log.o strutil.o -L/postgresql/software/9.6.2/lib -lpgcommon -lpgport -L/postgresql/software/9.6.2/lib -lpq -L/postgresql/software/9.6.2/lib -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/postgresql/software/9.6.2/lib',--enable-new-dtags -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(exec.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(wait_error.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgcommon.a(fe_memutils.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /postgresql/software/9.6.2/lib/libpgport.a(path.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:20: recipe for target 'repmgrd' failed make: *** [repmgrd] Error 1 It seems unlikely that those errors are generated simply by me not including ld_library_path? Is this is a result of how the EnterpriseDB postgresql is packaged somehow? I gave up on compiling this earlier today, and just built a standard postgresql and repmgr against the standard packages/repositories to test/play with. I'm happy to say it seems to work alright ... *if* you can get the software built :) I'll try recompiling this on RHEL tomorrow (and include the LD_LIBRARY_PATH) as suggested in an earlier message. Hopefully there will be some progress, 'cos this is urgently required. Do you happen to know if there's any documentation anywhere on installing/configuring repmgr with Enterprise DB PostgreSQL (community, *not* Advanced)? Many thanks for everybody's help with this, it's very much appreciated. Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 3 - libraries resolved, still can't compile :(
On 12/05/2017 18:57, Adrian Klaver wrote: On 05/12/2017 09:19 AM, Martin Goodson wrote: On 12/05/2017 16:59, Adrian Klaver wrote: Configuring Automatic failover using Replication Manager 2.0 on PostgreSQL 9.3.5 http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html "In this post, am demonstrating Replication Manager on single node(localhost) on RHEL 6.5 - PostgreSQL 9.3.5. In order to achieve an easy and good understanding of concept I have compiled repmgr with EnterpriseDB One Click Installer(a pre-build binary package) instead of PG source." Looks interesting! I'll give it a go tonight on a clean install and report back on how easy it was and how much of an idiot I am, or my abject failure and how much of an idiot I am :) To make things easier I would remove the deb installed Postgres, it just adds complexity to the situation without providing benefit. Many thanks! Regards, Martin. Progress of a sort. Kinda. On a clean Ubuntu server 17.04 virtual machine I've installed PostgreSQL 9.6 using the EnterpriseDB installer. The software was installed by sudo'ing the installer, configuring ownership to the 'pginst' userid and is up and running : pginst2582 1 0 09:22 ?00:00:00 /postgresql/software/9.6.2/bin/postgres -D /postgresql/software/9.6.2/data pginst2585 2582 0 09:22 ?00:00:00 postgres: logger process pginst2587 2582 0 09:22 ?00:00:00 postgres: checkpointer process pginst2588 2582 0 09:22 ?00:00:00 postgres: writer process pginst2589 2582 0 09:22 ?00:00:00 postgres: wal writer process pginst2590 2582 0 09:22 ?00:00:00 postgres: autovacuum launcher process pginst2591 2582 0 09:22 ?00:00:00 postgres: stats collector process I then downloaded the repmgr package (repmgr-3.3.1.tar.gz) from 2nd quadrant, unzipped and untarred etc to the directory /home/master/repmgr-3.3.1. I've followed the advice of the article Adrian suggested and installed some packages: gcc, make, libxslt1-dev, libpam0g-dev, libssl-dev, libkrb5-dev, libedit-dev, postgresql-server-dev-9.6 I have now apparently resolved the missing libraries problem. Or, at least, it's no longer complaining that libs are missing. I built a little install script which I sudo: clear PATH=/postgresql/software/9.6.2/bin:$PATH echo "PATH = $PATH" echo "" pg_config echo "" echo "make USE_PGXS=1 clean all" echo "" make USE_PGXS=1 clean all Which produces this output (including the output of pg_config): PATH = /postgresql/software/9.6.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin BINDIR = /postgresql/software/9.6.2/bin DOCDIR = /postgresql/software/9.6.2/doc/postgresql HTMLDIR = /postgresql/software/9.6.2/doc/postgresql INCLUDEDIR = /postgresql/software/9.6.2/include PKGINCLUDEDIR = /postgresql/software/9.6.2/include/postgresql INCLUDEDIR-SERVER = /postgresql/software/9.6.2/include/postgresql/server LIBDIR = /postgresql/software/9.6.2/lib PKGLIBDIR = /postgresql/software/9.6.2/lib/postgresql LOCALEDIR = /postgresql/software/9.6.2/share/locale MANDIR = /postgresql/software/9.6.2/share/man SHAREDIR = /postgresql/software/9.6.2/share/postgresql SYSCONFDIR = /postgresql/software/9.6.2/etc/postgresql PGXS = /postgresql/software/9.6.2/lib/postgresql/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--enable-debug' '--with-libs=/opt/local/Current/lib' '--with-includes=/opt/local/Current/include/libxml2:/opt/local/Current/include' '--prefix=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64' '--with-ldap' '--with-openssl' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/opt/local/EnterpriseDB/LanguagePack/9.6/Tcl-8.5/lib' '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' '--docdir=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/doc/postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' 'LD_LIBRARY_PATH=/opt/local/Current/lib' 'CFLAGS=-O2 -DMAP_HUGETLB=0x4' CC = gcc CPPFLAGS = -DFRONTEND -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 CFLAGS_SL = -fpic LDFLAGS = -L../../src/common -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.6.2 make USE_PGXS=1 clean all rm -f *.o rm -f repmgrd rm -f repmgr make -C sql clean make[1]: Entering directory '/home/master/repmgr-3.3.1/sql' rm -f repmgr_funcs.so librepmgr_funcs.a librepmgr_funcs.pc rm -f repmgr_funcs.sql rm -f re
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
On 12/05/2017 16:59, Adrian Klaver wrote: Configuring Automatic failover using Replication Manager 2.0 on PostgreSQL 9.3.5 http://raghavt.blogspot.com/2015/01/configuring-automatic-failover-using.html "In this post, am demonstrating Replication Manager on single node(localhost) on RHEL 6.5 - PostgreSQL 9.3.5. In order to achieve an easy and good understanding of concept I have compiled repmgr with EnterpriseDB One Click Installer(a pre-build binary package) instead of PG source." Looks interesting! I'll give it a go tonight on a clean install and report back on how easy it was and how much of an idiot I am, or my abject failure and how much of an idiot I am :) Many thanks! Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
On 12/05/2017 16:48, Adrian Klaver wrote: On 05/12/2017 08:30 AM, Martin Goodson wrote: On 12/05/2017 16:18, Joshua D. Drake wrote: Thanks for the response. The problem is I'm kind of stuck with using EnterpriseDB's community edition installers. It's a company policy. I can't install PostgreSQL using repositories, I ** have ** to use the 'Universal Installer' from EnterpriseDB. Surely there must be a way to build repmgr for, and integrate it into, a PostgreSQL db cluster built using EnterpriseDB? Am I really somehow running up against a hard limit or am I simply missing something? To follow up. If information in this post is still correct: https://www.postgresql.org/message-id/CAG7mmozd7VAtdGLyE8pMaxu2KRmJxNTvLTyA0N92nEhXZ4k6hQ%40mail.gmail.com the EDB pg_config should be in: /opt/PostgreSQL//bin/ The EDB installer allows you to specify where to install PostgreSQL, and uses /opt/PostgreSQL/ for the default. So yeah, mostly :) My PATH is this: /postgresql/software/pg/9.6.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin So it should already be picking up the EDB pg_config :) For comparison purposes, here's pg_config when run from the cluster owner (testdb), which should pick up pg_config from the EnterpriseDB settings: (testdb@repm:/postgresql/software/repmgr/repmgr-3.3.1$ type pg_config pg_config is /postgresql/software/pg/9.6.2/bin/pg_config) BINDIR = /postgresql/software/pg/9.6.2/bin DOCDIR = /postgresql/software/pg/9.6.2/doc/postgresql HTMLDIR = /postgresql/software/pg/9.6.2/doc/postgresql INCLUDEDIR = /postgresql/software/pg/9.6.2/include PKGINCLUDEDIR = /postgresql/software/pg/9.6.2/include/postgresql INCLUDEDIR-SERVER = /postgresql/software/pg/9.6.2/include/postgresql/server LIBDIR = /postgresql/software/pg/9.6.2/lib PKGLIBDIR = /postgresql/software/pg/9.6.2/lib/postgresql LOCALEDIR = /postgresql/software/pg/9.6.2/share/locale MANDIR = /postgresql/software/pg/9.6.2/share/man SHAREDIR = /postgresql/software/pg/9.6.2/share/postgresql SYSCONFDIR = /postgresql/software/pg/9.6.2/etc/postgresql PGXS = /postgresql/software/pg/9.6.2/lib/postgresql/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--enable-debug' '--with-libs=/opt/local/Current/lib' '--with-includes=/opt/local/Current/include/libxml2:/opt/local/Current/include' '--prefix=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64' '--with-ldap' '--with-openssl' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/opt/local/EnterpriseDB/LanguagePack/9.6/Tcl-8.5/lib' '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' '--docdir=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/doc/postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' 'LD_LIBRARY_PATH=/opt/local/Current/lib' 'CFLAGS=-O2 -DMAP_HUGETLB=0x4' CC = gcc CPPFLAGS = -DFRONTEND -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 CFLAGS_SL = -fpic LDFLAGS = -L../../src/common -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.6.2 And THIS is the output of pg_config when run from another user: (master@repm:~/repmgr-3.3.1$ type pg_config pg_config is hashed (/usr/bin/pg_config) ) BINDIR = /usr/lib/postgresql/9.6/bin DOCDIR = /usr/share/doc/postgresql-doc-9.6 HTMLDIR = /usr/share/doc/postgresql-doc-9.6 INCLUDEDIR = /usr/include/postgresql PKGINCLUDEDIR = /usr/include/postgresql INCLUDEDIR-SERVER = /usr/include/postgresql/9.6/server LIBDIR = /usr/lib/x86_64-linux-gnu PKGLIBDIR = /usr/lib/postgresql/9.6/lib LOCALEDIR = /usr/share/locale MANDIR = /usr/share/postgresql/9.6/man SHAREDIR = /usr/share/postgresql/9.6 SYSCONFDIR = /etc/postgresql-common PGXS = /usr/lib/postgresql/9.6/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-tclconfig=/usr/lib/x86_64-linux-gnu/tcl8.6' '--with-includes=/usr/include/tcl8.6' 'PYTHON=/usr/bin/python' '--mandir=/usr/share/postgresql/9.6/man' '--docdir=/usr/share/doc/postgresql-doc-9.6' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/9.6' '--bindir=/usr/lib/postgresql/9.6/bin' '--libdir=/usr/lib/x86_64-linux-gnu/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-tap-tests' '--enable-debug' '--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo
Re: [GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
On 12/05/2017 16:18, Joshua D. Drake wrote: On 05/12/2017 08:13 AM, Martin Goodson wrote: Hello. Yesterday I had problems getting repmgr installed, since our PostgreSQL installs to a non-standard place, and doesn't use any postgresql repositories/packages. The responses I got generally seemed to be 'you need to compile it'. I'm running ubuntu server 17.04. The EnterpriseDB installer was used to quickly install a quick test PostgreSQL db, "testdb" under owning userid "testdb". Here is the output of pg_config: This is your problem. As Adrian already mentioned, you should be running the PGDG apt repos. https://www.postgresql.org/download/linux/ubuntu/ Universal installers are great for a one off, "Hey let's see what we can do!" but they are not useful once you want to extend, have community support and or do things like easily install Repmgr. Good luck! JD Thanks for the response. The problem is I'm kind of stuck with using EnterpriseDB's community edition installers. It's a company policy. I can't install PostgreSQL using repositories, I ** have ** to use the 'Universal Installer' from EnterpriseDB. Surely there must be a way to build repmgr for, and integrate it into, a PostgreSQL db cluster built using EnterpriseDB? Am I really somehow running up against a hard limit or am I simply missing something? Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] EnterpriseDB installed PostgreSQL 9.6 vs. REPMGR. Round 2 - compilation issues.
ng something really, really, obvious. Every single book and article I've seen simply states 'Just quickly install repmgr then ...' - it's driving me nuts that I can't get this thing installed, let alone working :) Any help/advice/suggestions/pointing-outs-of-the-obvious would be greatly appreciated. Regards, Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it."
[GENERAL] Installing repmgr alongside PostgreSQL installed via EnterpriseDB installer instead of repositories?
Hello. First time poster, so please be gentle :) I have a PostgreSQL 9.6 database cluster running on a standalone Redhat 7.2 (Maipo) server. This may seem like a silly question. It probably *is* a silly question, so apologies in advance. PostgreSQL was installed using the "EDB Postgres Standard" installer from EnterpriseDB - https://www.enterprisedb.com/software-downloads-postgres - and installed to a specific location - /db_. No repositories, nothing in a 'standard' place. Output of pg_config is as follows: BINDIR = /db_dbname/app/postgres/9.6.2-3/bin DOCDIR = /db_dbname/app/postgres/9.6.2-3/doc/postgresql HTMLDIR = /db_dbname/app/postgres/9.6.2-3/doc/postgresql INCLUDEDIR = /db_dbname/app/postgres/9.6.2-3/include PKGINCLUDEDIR = /db_dbname/app/postgres/9.6.2-3/include/postgresql INCLUDEDIR-SERVER = /db_dbname/app/postgres/9.6.2-3/include/postgresql/server LIBDIR = /db_dbname/app/postgres/9.6.2-3/lib PKGLIBDIR = /db_dbname/app/postgres/9.6.2-3/lib/postgresql LOCALEDIR = /db_dbname/app/postgres/9.6.2-3/share/locale MANDIR = /db_dbname/app/postgres/9.6.2-3/share/man SHAREDIR = /db_dbname/app/postgres/9.6.2-3/share/postgresql SYSCONFDIR = /db_dbname/app/postgres/9.6.2-3/etc/postgresql PGXS = /db_dbname/app/postgres/9.6.2-3/lib/postgresql/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--enable-debug' '--with-libs=/opt/local/Current/lib' '--with-includes=/opt/local/Current/include/libxml2:/opt/local/Current/include' '--prefix=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64' '--with-ldap' '--with-openssl' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/opt/local/EnterpriseDB/LanguagePack/9.6/Tcl-8.5/lib' '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' '--docdir=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/doc/postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' 'LD_LIBRARY_PATH=/opt/local/Current/lib' 'CFLAGS=-O2 -DMAP_HUGETLB=0x4' CC = gcc CPPFLAGS = -DFRONTEND -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -DMAP_HUGETLB=0x4 CFLAGS_SL = -fpic LDFLAGS = -L../../src/common -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm VERSION = PostgreSQL 9.6.2 I have now been tasked with putting repmgr onto this box and converting it from a standalone to a multiple node setup (I have two additional servers lurking in the background ready for use :) ). Numerous articles on repmgr all seem to suggest it should be a relatively simply operation once the software is in place. Register the master. Clone standbys. Ought to be *relatively* straight-forward. Unfortunately, I'm having problems at the first hurdle - putting the software in place. We initially tried installing from the postgres repository rpm - which insisted, of course, on installing PostgreSQL as well as repmgr in /usr/pgsql-9.6. Obviously not the right place for it given we're running our binaries from /db_dbname/app/postgres/9.6.2-3/bin Is there a simple way to use repmgr from the package, perhaps by copying/linking files from that location to ours? (e.g. copying/linking some files from lib, bin, contrib, etc). Or am I looking at having to compile the source? I'm told it should be 'simple' but I've not compiled much software from scratch on linux, so I'm a bit nervous about the prospect. Any advice would be welcome :) Basically, am I going to be stuck compiling from source or is there a way around this? Many thanks. Martin. -- Martin Goodson "Have you thought up some clever plan, Doctor?" "Yes, Jamie, I believe I have." "What're you going to do?" "Bung a rock at it." -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general