[GENERAL] Postgresql using lxd faild to find address

2016-10-11 Thread Scottix
Hi I am using postgresql 9.5 in lxd container on Ubuntu. Using the stock
64bit 16.04 ubuntu image. Postgres is working just fine within the
container, but when I try to assign the ip address associated to the
container it fails to recognize it at boot. When I restart postgresql it
recognizes it just fine. So it seems like it is not getting the ip address,
maybe it is a little bit slower. Anyway to delay the boot time?

Steps to reproduce:
1. Setup lxd container
2. Install postgresql-9.5
3. Configure ip address in the config
4. restart container

Symptoms:
1. postgresql running fine
2. No ip address assigned to postgresql

Logs:
2016-10-10 14:40:33 UTC [143-1] LOG:  could not bind IPv4 socket: Cannot
assign requested address
2016-10-10 14:40:33 UTC [143-2] HINT:  Is another postmaster already
running on port 5432? If not, wait a few seconds and retry.
2016-10-10 14:40:33 UTC [143-3] WARNING:  could not create listen socket
for "10.0.3.51"
2016-10-10 14:40:33 UTC [144-1] LOG:  database system was shut down at
2016-10-07 23:05:34 UTC
2016-10-10 14:40:33 UTC [144-2] LOG:  MultiXact member wraparound
protections are now enabled
2016-10-10 14:40:33 UTC [143-4] LOG:  database system is ready to accept
connections
2016-10-10 14:40:33 UTC [148-1] LOG:  autovacuum launcher started

#systemctl restart postgresql

2016-10-10 15:17:33 UTC [2353-1] LOG:  database system was shut down at
2016-10-10 15:17:32 UTC
2016-10-10 15:17:33 UTC [2353-2] LOG:  MultiXact member wraparound
protections are now enabled
2016-10-10 15:17:33 UTC [2352-1] LOG:  database system is ready to accept
connections
2016-10-10 15:17:33 UTC [2357-1] LOG:  autovacuum launcher started

Thanks


[GENERAL] Unmet dependency Ubuntu 15.10

2016-01-11 Thread Scottix
I am trying to install postgresql-9.5 on Ubuntu 15.10 but I am getting an
unmet dependency.

cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ wily-pgdg main

4.2.0-23-generic #28-Ubuntu SMP

~/r/a/src> sudo apt-get install postgresql-9.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-9.5 : Depends: postgresql-client-9.5
  Depends: postgresql-common (>= 142~) but it is not going
to be installed
E: Unable to correct problems, you have held broken packages.

~/r/a/src> sudo apt-get install postgresql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-common : Depends: postgresql-client-common (>= 172.pgdg15.10+1)
but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

~/r/a/src> sudo apt-get install postgresql-client-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-client-common : Depends: pgdg-keyring but it is not installable
E: Unable to correct problems, you have held broken packages.

~/r/a/src> sudo apt-get install pgdg-keyring
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package pgdg-keyring is not available, but is referred to by another
package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'pgdg-keyring' has no installation candidate


[GENERAL] Postgres SIGALRM timer

2015-06-19 Thread Scottix
I am running a posgres server with a zabbix server and zabbix agent and I
am getting a bunch errors about SIGALRM, It makes postgres drop connections
randomly.

Ubuntu 14.04.2 LTS
Linux Host 3.19.0-21-generic #21~14.04.1-Ubuntu SMP Sun Jun 14 18:45:42 UTC
2015 x86_64 x86_64 x86_64 GNU/Linux
Postgres 9.4.4

CPU:
model name : Intel(R) Core(TM) i3 CPU 540  @ 3.07GHz

Memory:
4GB

No significant load is on the machine.

2015-06-19 08:45:22 PDT FATAL:  could not enable SIGALRM timer: Invalid
argument
2015-06-19 08:45:53 PDT FATAL:  could not enable SIGALRM timer: Invalid
argument
2015-06-19 08:45:53 PDT FATAL:  could not enable SIGALRM timer: Invalid
argument
2015-06-19 08:45:53 PDT FATAL:  could not enable SIGALRM timer: Invalid
argument
2015-06-19 08:45:53 PDT FATAL:  could not enable SIGALRM timer: Invalid
argument
2015-06-19 08:45:53 PDT FATAL:  could not enable SIGALRM timer: Invalid
argument
2015-06-19 08:45:53 PDT FATAL:  could not enable SIGALRM timer: Invalid
argument

Any help appreciated.