<div dir="ltr">The pgsql resource agent uses /bin/sh. I think it doesn't work because on RH/CentOS, /bin/sh is linked to bash, whereas on Ubuntu it's linked to dash, which doesn't source .bash_profile (which in turn sources .pgsql_profile on my system). You could try putting it in .profile? I don't currently have access to an Ubuntu system to confirm this though.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 15, 2019 at 6:51 PM Patrick <<a href="mailto:clusterlabs@localhorst.es">clusterlabs@localhorst.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Hi Tiemen,</div><div><br></div><div>thank you for your fast response.</div><div>At the moment using .pgsql_profile seems not working for me.</div><div>Can you confirm that I should see the ORACLE_HOME env by grepping /proc/$pid_of_postmaster/environ? If I run 'pg_ctl -D /pgdata start' I can see the variable there. If I let Pacemaker</div><div>start the resource, ORACLE_HOME is not present, when I grep under /proc/****/environ.</div><div><br></div><div>PostgreSQL is compiled from source and is running on Ubuntu 18.04. <br></div><div><br></div><div>On Jul 15, 2019 4:53:47 PM, Tiemen Ruiten wrote: </div><blockquote class="gmail-m_-7478918580847272241felamimail-body-blockquote"><div dir="ltr">You could just export the variables in .pgsql_profile in the home directory of the user running PostgreSQL (usually /var/lib/pgsql). This is what I have in there for oracle_fdw:<div><br></div><blockquote class="gmail-m_-7478918580847272241felamimail-body-blockquote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">export PATH=$PATH:/usr/pgsql-11/bin<br>ORACLE_HOME=/usr/lib/oracle/12.1/client64<br>export LD_LIBRARY_PATH="$ORACLE_HOME/lib" </blockquote><div><br></div><div>At least if you installed the RPMs from the PGDG repo, this file will be sourced by .bash_profile.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 15, 2019 at 4:24 PM Patrick <<a href="mailto:clusterlabs@localhorst.es" target="_blank">clusterlabs@localhorst.es</a>> wrote:<br></div><blockquote class="gmail-m_-7478918580847272241felamimail-body-blockquote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Hi,</div><div><br></div><div>I successfully set up a pacemaker cluster serving PostgreSQL.</div><div>I now have to pass some Oracle specific environment variables (i.e. ORACLE_HOME, TNS_ADMIN) to the PostgreSQL resource.</div><div>I tried this by editing the resource ocf script "/usr/lib/ocf/resource.d/heartbeat/pgsql" without success.</div><div>Can someone tell me how to solve this?</div><div><br></div><div>Kind regards,</div><div>Patrick<br></div></div>
_______________________________________________<br>
Manage your subscription:<br><a href="https://lists.clusterlabs.org/mailman/listinfo/users" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br><br>
ClusterLabs home: <a href="https://www.clusterlabs.org/" target="_blank">https://www.clusterlabs.org/</a></blockquote></div>
_______________________________________________<br>Manage your subscription:<br><a href="https://lists.clusterlabs.org/mailman/listinfo/users" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a><br><br>ClusterLabs home: <a href="https://www.clusterlabs.org/" target="_blank">https://www.clusterlabs.org/</a></blockquote><br></div>
</blockquote></div>