Thread: Dynamic configuration via LDAP in postmaster

Dynamic configuration via LDAP in postmaster

From
Vasily Soshnikov
Date:
<div dir="ltr">I need advise about where is best place for adding such features.<br /><br />Currently I found that
'postmaster'have event loop(including handling SIGHUP) inside PostgressMain(postgress.c)  for realoding configuration
file,based on my investigation my plan is handling ldap events just before SIGHUP.<br /><br />PS I guess tomorrow I
willstart implement this feature inside 'postmaster', but before I start I wish to know expert opinion about where are
mostgood place for dispatching of incomming messages(about configuration has changed etc) from the ldap.<div
class=""><divclass="" id=":2nn" tabindex="0"><img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif"
/></div></div><brclear="all" /><br />-- <br /><i><span style="color:rgb(153,153,153)"></span><br
style="color:rgb(153,153,153)"/><span style="color:rgb(153,153,153)">Regard,</span><br style="color:rgb(153,153,153)"
/><brstyle="color:rgb(153,153,153)" /><span style="color:rgb(153,153,153)">Soshnikov Vasily mailto:<a
href="mailto:dedok.mad@gmail.com"target="_blank">dedok.mad@gmail.com</a></span><br /></i></div> 

Re: Dynamic configuration via LDAP in postmaster

From
Heikki Linnakangas
Date:
On 12/03/2013 05:44 PM, Vasily Soshnikov wrote:
> I need advise about where is best place for adding such features.
>
> Currently I found that 'postmaster' have event loop(including handling
> SIGHUP) inside PostgressMain(postgress.c)  for realoding configuration
> file, based on my investigation my plan is handling ldap events just before
> SIGHUP.
>
> PS I guess tomorrow I will start implement this feature inside
> 'postmaster', but before I start I wish to know expert opinion about where
> are most good place for dispatching of incomming messages(about
> configuration has changed etc) from the ldap.

postmaster is kept very small on purpose, because if that process dies, 
it will take the whole server down with it. I'd suggest writing a custom 
background worker that talks with the ldap server. It can then write the 
changes to the configuration files, and send SIGHUP to reload.

- Heikki



Re: Dynamic configuration via LDAP in postmaster

From
Vasily Soshnikov
Date:
<div dir="ltr">Thank you for the advice, nowadays we(company where I work) use such scheme but that scheme is not
alwaysuseful at the stage of development of the back-end infrastructure. Also we have found a better solution : have
ldapfor dynamic configuraion out of the box.<br /><br />So question is following: if you got such task, where do you
putldap functionality inside postgres daemon?<br /><br />PS I have read the basics of ideology Posgresql and I know why
youguys make main server tiny in functionality and this is great, but we would like to have more complex solution.<br
/>This feature may be useful not only for me and my company.  </div><div class="gmail_extra"><br /><br /><div
class="gmail_quote">On3 December 2013 20:54, Heikki Linnakangas <span dir="ltr"><<a
href="mailto:hlinnakangas@vmware.com"target="_blank">hlinnakangas@vmware.com</a>></span> wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/03/2013
05:44PM, Vasily Soshnikov wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">I need advise about where is best place for adding such features.<br /><br /> Currently I found
that'postmaster' have event loop(including handling<br /> SIGHUP) inside PostgressMain(postgress.c)  for realoding
configuration<br/> file, based on my investigation my plan is handling ldap events just before<br /> SIGHUP.<br /><br
/>PS I guess tomorrow I will start implement this feature inside<br /> 'postmaster', but before I start I wish to know
expertopinion about where<br /> are most good place for dispatching of incomming messages(about<br /> configuration has
changedetc) from the ldap.<br /></blockquote><br /></div> postmaster is kept very small on purpose, because if that
processdies, it will take the whole server down with it. I'd suggest writing a custom background worker that talks with
theldap server. It can then write the changes to the configuration files, and send SIGHUP to reload.<span
class="HOEnZb"><fontcolor="#888888"><br /><br /> - Heikki<br /></font></span></blockquote></div><br /><br clear="all"
/><br/>-- <br /><i><span style="color:rgb(153,153,153)"></span><br style="color:rgb(153,153,153)" /><span
style="color:rgb(153,153,153)">Regard,</span><brstyle="color:rgb(153,153,153)" /><br style="color:rgb(153,153,153)"
/><spanstyle="color:rgb(153,153,153)">Soshnikov Vasily mailto:<a href="mailto:dedok.mad@gmail.com"
target="_blank">dedok.mad@gmail.com</a></span><br/></i></div>