<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=641&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=641</link>
		<description><![CDATA[The most recent posts in PostgreSQL 9.6 and pgAdmin4 v1.5 Installation.]]></description>
		<lastBuildDate>Fri, 17 Nov 2017 23:41:04 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=6297#p6297</link>
			<description><![CDATA[<div class="codebox"><pre><code>postgresql-9.6:
  Installed: (none)
  Candidate: 9.6.3-1~bpo8+1
  Version table:
     9.6.3-1~bpo8+1 0
        100 http://auto.mirror.devuan.org/merged/ jessie-backports/main amd64 Packages</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 17 Nov 2017 23:41:04 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=6297#p6297</guid>
		</item>
		<item>
			<title><![CDATA[Re: PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=6284#p6284</link>
			<description><![CDATA[<p>@MantaRei -&#160; Basic question incoming...</p><p>Could you highlight how you were able to install `postgresql-9.6`</p><p>I get the following:</p><div class="codebox"><pre><code>host% sudo apt-get install postgresql-9.6 postgresql-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package postgresql-9.6
E: Couldn&#039;t find any package by regex &#039;postgresql-9.6&#039;</code></pre></div><p>I can do the following:</p><div class="codebox"><pre><code>host% sudo apt-cache policy postgresql                     
postgresql:
  Installed: (none)
  Candidate: 9.4+165+deb8u3
  Version table:
     9.4+165+deb8u3 0
        500 http://auto.mirror.devuan.org/merged/ jessie-security/main amd64 Packages
     9.4+165+deb8u2 0
        500 http://auto.mirror.devuan.org/merged/ jessie/main amd64 Packages</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dan_mi_sun)]]></author>
			<pubDate>Fri, 17 Nov 2017 11:23:40 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=6284#p6284</guid>
		</item>
		<item>
			<title><![CDATA[Re: PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=3379#p3379</link>
			<description><![CDATA[<p>Here is a quote of a postgresql related headache with a flood of logs<br />It will be interesting to see what your logs may look like after some use.<br />In about 10 days of discussion in another distro there hasn&#039;t been a reasonable solution to the problem, other than the original dilemma to switch systemd off.</p><div class="quotebox"><blockquote><div><p>Hi,<br />I&#039;m running Debian server hosting Request Tracker with Postgresql as<br />database back-end. There is also gnupg-agent &amp; dirmngr installed<br />(because of SMIME/GPG mail support). Systemd logs about starting user<br />sessions and Postgresql for some reason starts user sessions internally<br />frequently. This is the result of upgrade from Jessie to Stretch on<br />syslog size:</p><p>&#160; rt2:/etc/systemd# ll /var/log/syslog-2017* |tail<br />&#160; -rw-r----- 1 root adm&#160; &#160; &#160;8058 Jun 28 06:25 /var/log/syslog-20170628.gz<br />&#160; -rw-r----- 1 root adm&#160; &#160; &#160;7967 Jun 29 06:25 /var/log/syslog-20170629.gz<br />&#160; -rw-r----- 1 root adm&#160; 2537880 Jun 30 06:25 /var/log/syslog-20170630.gz<br />&#160; -rw-r----- 1 root adm&#160; 3111373 Jul&#160; 1 06:26 /var/log/syslog-20170701.gz<br />&#160; -rw-r----- 1 root adm&#160; 3265502 Jul&#160; 2 06:26 /var/log/syslog-20170702.gz<br />&#160; -rw-r----- 1 root adm&#160; 3264072 Jul&#160; 3 06:26 /var/log/syslog-20170703.gz<br />&#160; -rw-r----- 1 root adm&#160; 3241260 Jul&#160; 4 06:26 /var/log/syslog-20170704.gz<br />&#160; -rw-r----- 1 root adm&#160; 3255989 Jul&#160; 5 06:26 /var/log/syslog-20170705.gz<br />&#160; -rw-r----- 1 root adm&#160; 3256939 Jul&#160; 6 06:26 /var/log/syslog-20170706.gz<br />&#160; -rw-r----- 1 root adm 63687210 Jul&#160; 7 06:26 /var/log/syslog-20170707</p><p>I did upgrade on Jun 30...</p><p>The system log was full of </p><p>&#160; Jul&#160; 6 06:26:33 rt2 liblogging-stdlog:&#160; [origin software=&quot;rsyslogd&quot; swVersion=&quot;8.24.0&quot; x-pid=&quot;406&quot; x-info<br />&#160; =&quot;http://www.rsyslog.com&quot;] rsyslogd was HUPed<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1]: Created slice User Slice of postgres.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1]: Starting User Manager for UID 109...<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1]: Started Session c146966 of user postgres.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Listening on GnuPG cryptographic agent and passphrase cache (restricte<br />&#160; d).<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Listening on GnuPG cryptographic agent (access for web browsers).<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Listening on GnuPG cryptographic agent (ssh-agent emulation).<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Listening on GnuPG network certificate management daemon.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Reached target Paths.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Reached target Timers.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Listening on GnuPG cryptographic agent and passphrase cache.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Reached target Sockets.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Reached target Basic System.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Reached target Default.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Startup finished in 11ms.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1]: Started User Manager for UID 109.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1]: Stopping User Manager for UID 109...<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Stopped target Default.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Stopped target Basic System.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Stopped target Sockets.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Closed GnuPG network certificate management daemon.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Closed GnuPG cryptographic agent and passphrase cache.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Closed GnuPG cryptographic agent (access for web browsers).<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Closed GnuPG cryptographic agent and passphrase cache (restricted).<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Closed GnuPG cryptographic agent (ssh-agent emulation).<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Reached target Shutdown.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Starting Exit the Session...<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Stopped target Paths.<br />&#160; Jul&#160; 6 06:26:36 rt2 systemd[1860]: Stopped target Timers.<br />&#160; ...</p><p><strong><span class="bbu"><span style="color: blue">19 user sessions per minute</span></span> :-/.</strong><br />I found a bug report<br /><a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850982" rel="nofollow">https://bugs.debian.org/cgi-bin/bugrepo … bug=850982</a></p><p>But after disabling gnupg-agent &amp; dirmngs sockets using:</p><p>&#160; systemctl --global mask --now dirmngr.socket<br />&#160; systemctl --global mask --now gpg-agent.service gpg-agent.socket gpg-agent-ssh.socket gpg-agent-extra.socket gpg-agent-browser.socket</p><p>I got this</p><p>&#160; Jul&#160; 7 12:16:36 rt2 systemd[21005]: gpg-agent-ssh.socket: Cannot add dependency job, ignoring: Unit gpg-agent-ssh.socket is masked.<br />&#160; Jul&#160; 7 12:16:36 rt2 systemd[21005]: gpg-agent.socket: Cannot add dependency job, ignoring: Unit gpg-agent.socket is masked.<br />&#160; Jul&#160; 7 12:16:36 rt2 systemd[21005]: gpg-agent-extra.socket: Cannot add dependency job, ignoring: Unit gpg-agent-extra.socket is masked.<br />&#160; Jul&#160; 7 12:16:36 rt2 systemd[21005]: gpg-agent-browser.socket: Cannot add dependency job, ignoring: Unit gpg-agent-browser.socket is masked.<br />&#160; Jul&#160; 7 12:16:36 rt2 systemd[21005]: dirmngr.socket: Cannot add dependency job, ignoring: Unit dirmngr.socket is masked.</p><p>instead of info about opening/closing sockets :-/</p><p>Finally I tried</p><p>&#160; loginctl enable-linger postgres</p><p>Now the only thing rest:</p><p>&#160; Jul&#160; 7 15:42:35 rt2 systemd[1]: Started Session c4504 of user postgres.<br />&#160; Jul&#160; 7 15:42:35 rt2 systemd[1]: Started Session c4505 of user postgres.<br />&#160; Jul&#160; 7 15:42:35 rt2 systemd[1]: Started Session c4506 of user postgres.<br />&#160; Jul&#160; 7 15:42:35 rt2 systemd[1]: Started Session c4507 of user postgres.<br />&#160; Jul&#160; 7 15:42:35 rt2 systemd[1]: Started Session c4508 of user postgres.<br />&#160; Jul&#160; 7 15:42:36 rt2 systemd[1]: Started Session c4509 of user postgres.</p><p><strong><span class="bbu">Every minute 19 lines of this. </span></strong></p><p>I have Postgresql installed on several machines and every logs to two remote<br />syslog servers. Why store and transfer over net this cruft.</p><p><strong><span class="bbu">How I should get rid of this session management the right way? (Besides<br /><span style="color: red">switching to SysV init)</span></span></strong></p><p><a href="https://access.redhat.com/solutions/1564823" rel="nofollow">https://access.redhat.com/solutions/1564823</a><br />&#160; &#160; - this seems to me a bit a hack</p><p>Switch systemd LogLevel to notice?<br />(<a href="https://www.centos.org/forums/viewtopic.php?t=48785" rel="nofollow">https://www.centos.org/forums/viewtopic.php?t=48785</a>)<br />&#160; &#160; - maybe I will miss something in the future?</p><p>Isn&#039;t this a problem of Postgresql the user session opened so<br />frequently?</p><p>Regards<br />-- <br />Zito</p></div></blockquote></div><p>But here is a reasonable analysis of the problem</p><div class="quotebox"><blockquote><div><p>Václav Ovsík:<br />&gt; How I should get rid of this session management the right way?</p><p>I have seen this systemd problem myself.</p><p>What is happening is that every time something SSHes in as user postgres,<br />systemd-logind is starting up a per-user instance of systemd along with with a<br />whole bunch of per-user socket units (and whatever else you have configured all<br />per-user service managers to start up); and whenever the SSH session finishes,<br />systemd-logind is dutifully shutting down that per-user instance.</p><p><strong><span class="bbu">There&#039;s no way to actually turn the per-user instance off, for accounts that<br />should *never* have per-user service managers.</span></strong>&#160; The<strong> best that you can do is<br />pretty much the opposite and turn it *always on*.&#160; You do this by telling<br />systemd-logind that the postgres user is a &quot;lingering&quot; user</strong>.&#160; There is a<br />loginctl command for doing so.&#160; Then it will start up the per-user instance of<br />systemd and leave it running.</p><p>(You could also remove the user@.service template outright, which removes<br />per-user service management for *all* user accounts, including those for real<br />human beings.&#160; However, this still results in log noise, as the failed attempts<br />by systemd-logind to start up user@NNNN services on every SSH login will all be<br />logged.&#160; In the &quot;lingering&quot; case, there is less log noise.)</p><p>Of course, the postgres account is most definitely an account which should never<br />have a per-user service manager.&#160; So, too, are dedicated accounts for things<br />like (say) Nagios monitoring.</p><p>But there&#039;s no mechanism for specifying such accounts, or (conversely, and more<br />usefully given the general ratio of general-purpose use to role accounts) for<br />specifying the accounts that should have a per-user service manager and saying<br />that all other accounts should not.&#160; So the best that you can do is be very<br />aware that everything installed and enabled in /usr/lib/systemd/user is going to<br />have an instance running with the user access of your postgres account, and be<br />very careful about what you put in there.&#160; (The gpg-agent package has already<br />dumped some GPG stuff there and enabled it, notice.)</p></div></blockquote></div><p>This was the straw for me, to bail out while I was ahead of myself.<br />This complex simplification of an init system is like a bomb waiting to explode.&#160; Too many people trying so many different patches for a ship that is about to sink that it will become acceleratingly comlex to audit or manage.&#160; In a year or two nobody will be able to figure out why 99% is inside systemd code.</p><p>The problem with too many log files is not the size on the disk but the inablility to review anything and locate anything meaningful.</p><p>My 2cents, anyway.</p>]]></description>
			<author><![CDATA[dummy@example.com (fungus)]]></author>
			<pubDate>Sun, 16 Jul 2017 16:07:04 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=3379#p3379</guid>
		</item>
		<item>
			<title><![CDATA[Re: PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=2027#p2027</link>
			<description><![CDATA[<div class="codebox"><pre class="vscroll"><code>#Install Postgres and client
#sudo to root ( i.e. user@yourbox:~# )

sudo apt-get install postgresql-9.6 postgresql-client

################################

#PGAdmin4 ver 1.5 - Install &amp; run instructions 05292017
# Install virtalenv and other required packages...

sudo apt-get install build-essential     #this may already be installed
sudo apt-get libssl-dev python-dev libgmp3-dev
sudo apt-get install virtualenv python-pip libpq-dev 

#cd /opt
#mkdir environmentpy
 
#cd environnmentpy
virtualenv pgadmin4
 
#cd pgadmin4
source bin/activate     #this will activate the virtual environnmnet
 
#The next line should look like this...
      # &quot; (pgadmin4) user@yourbox:/opt/environmentpy/pgadmin4# &quot;

#Download and install PGAdmin4

wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.5/pip/pgadmin4-1.5-py2.py3-none-any.whl

pip install pgadmin4-1.5-py2.py3-none-any.whl

#cd lib/python2.7/site-packages/pgadmin4

#The next line should look like this...
      # &quot; (pgadmin4) user@yourbox:/opt/environmentpy/pgadmin4/lib/python2.7/site-packages/pgadmin4# &quot;

touch config_local.py

#Configuration ## We need to write the SERVER_MODE = False to run in single user mode...

echo &quot;SERVER_MODE - False&quot; &gt;&gt; lib/python2.7/site-packages/pgadmin4/config_local.py

#Run PGAdmin4
python pgAdmin4.py

#Initial setup message will prompt you to enter email address and a password
#Follow prompts correctly and should see &quot; database has been created at /root/.pgadmin/pgadmin4.db  ..etc..etc &quot;Please navigate to http://localhost:5050 in your   browser&quot;

#Open your browser and gain access by pasting the following into browser
http://localhost:5050

#Enter login/password
#In the General tab, name the DB 
#In the Connection tab enter host address and port 5432 and database username/pass</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (MantaRei)]]></author>
			<pubDate>Tue, 06 Jun 2017 04:01:14 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=2027#p2027</guid>
		</item>
		<item>
			<title><![CDATA[Re: PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=1964#p1964</link>
			<description><![CDATA[<p>Nice to see that you found the BBCode options.&#160; Could you please edit the commands in your original post?&#160; It would then look something like <strong><a href="https://dev1galaxy.org/viewtopic.php?id=612" rel="nofollow">this</a></strong>.</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Sun, 04 Jun 2017 02:42:24 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=1964#p1964</guid>
		</item>
		<item>
			<title><![CDATA[Re: PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=1963#p1963</link>
			<description><![CDATA[<div class="codebox"><pre><code>test
test</code></pre></div><p>Yes, after posting i thought should have stayed in &quot;other issues&quot; but too late..</p>]]></description>
			<author><![CDATA[dummy@example.com (MantaRei)]]></author>
			<pubDate>Sun, 04 Jun 2017 02:18:11 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=1963#p1963</guid>
		</item>
		<item>
			<title><![CDATA[Re: PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=1947#p1947</link>
			<description><![CDATA[<p>Please use BBCode to format your post, also, this might not be the correct section for that, but someone else should take care of it shortly.</p>]]></description>
			<author><![CDATA[dummy@example.com (malinas)]]></author>
			<pubDate>Fri, 02 Jun 2017 22:12:20 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=1947#p1947</guid>
		</item>
		<item>
			<title><![CDATA[PostgreSQL 9.6 and pgAdmin4 v1.5 Installation]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=1763#p1763</link>
			<description><![CDATA[<p>Hello all, </p><p>I have just successfully completed the steps below to install the latest version of Postgres and pgAdmin4<br />My previous questions on MySQL caused my thoughts to fork after meditating on long term needs. Postgres, I feel, is to be the better fit.<br />If there was an easier way to do this or if there are any mistakes, feel free to point out.<br />Also, please know this is just the install and I have not tried to actually use the database yet. There is still much to learn but getting this far in last 48hrs has been educational..</p><p>################################</p><p> #Install Postgres and client<br /> # 1.) sudo to root ( i.e. user@yourbox:~# )</p><p>sudo apt-get install postgresql-9.6 postgresql-client</p><p>################################</p><p>PGAdmin4 ver 1.5 - Install &amp; run instructions 05292017</p><p>################################</p><p> # 2.) Install virtalenv and other required packages...</p><p>sudo apt-get install build-essential&#160; &#160; &#160;#this may already be installed<br />sudo apt-get libssl-dev python-dev libgmp3-dev<br />sudo apt-get install virtualenv python-pip libpq-dev</p><p> #cd /opt<br /> #mkdir enviornmentpy</p><p> #cd enviornmentpy<br />virtualenv pgadmin4</p><p> #cd pgadmin4<br />source bin/activate&#160; &#160; &#160;#this will activate the virtual enviornmnet</p><p> #The next line should look like this...<br />&#160; &#160; &#160; # &quot; (pgadmin4) user@yourbox:/opt/environmentpy/pgadmin4# &quot;</p><p> # 3.) Download and install PGAdmin4</p><p>wget <a href="https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v1.5/pip/pgadmin4-1.5-py2.py3-none-any.whl" rel="nofollow">https://ftp.postgresql.org/pub/pgadmin/ … ne-any.whl</a></p><p>pip install pgadmin4-1.5-py2.py3-none-any.whl</p><p> #cd lib/python2.7/site-packages/pgadmin4</p><p> #The next line should look like this...<br />&#160; &#160; &#160; # &quot; (pgadmin4) user@yourbox:/opt/environmentpy/pgadmin4/lib/python2.7/site-packages/pgadmin4# &quot;</p><p>touch config_local.py</p><p> #4.) Configuration ## We need to write the SERVER_MODE = False to run in single user mode...</p><p>echo &quot;SERVER_MODE - False&quot; &gt;&gt; lib/python2.7/site-packages/pgadmin4/config_local.py</p><p> #5.) Run PGAdmin4</p><p>python pgAdmin4.py</p><p> #Initial setup message will prompt you to enter email address and a password<br /> #Follow prompts correctly and should see &quot; database has been created at /root/.pgadmin/pgadmin4.db&#160; ..etc..etc &quot;Please navigate to http://localhost:5050 in your&#160; &#160;browser&quot;</p><p> #Open your browser and gain access by pasting the following into browser<br />http://localhost:5050</p><p> #Enter login/password<br /> #In the General tab, name the DB <br /> #In the Conneciton tab enter host address and port 5432 and database username/pass</p><p>...DONE</p>]]></description>
			<author><![CDATA[dummy@example.com (MantaRei)]]></author>
			<pubDate>Mon, 29 May 2017 07:05:57 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=1763#p1763</guid>
		</item>
	</channel>
</rss>
