Adrian Klaver writes:
> Best guess, since this is a laptop, the network is not connected until
> NetworkManager(or something similar) is active. On my laptop that
> happens late in the startup sequence, after Postgres starts. This is
> especially true if you are connecting to a wireless AP.
I ca
On 08/25/2015 01:30 AM, Igor Sosa Mayor wrote:
Igor Sosa Mayor writes:
Igor Sosa Mayor writes:
My question is therefore:
1. is there a way to permit the pl/python to connect to the internet all
the time and with a better configuration?
2. or should I forget the procedure and write a pyt
Dave Potts writes:
> In cases like this I normally restart the progresql under strace/truss
> etc and then wade through the output, it will normally tell me which
> process was invoked.
Thanks for the hint. I answered you indirectly in other email.
--
Sent via pgsql-general mailing list (pgs
Igor Sosa Mayor writes:
> Maybe it has something to do with systemd? I'm trying to get all debug
A little more information: the unit of postgresql in my systemd looks
like this[1]. That means, it is started of course after the network (but
maybe there is not any connection avalaible?)
[1]
[Unit
Adrian Klaver writes:
>> But I see that the log options in PG are really rich. Could maybe
>> someone tell me which could be the best options to find the problem? I
>> will be offline now during 24h, but I will try to make some experiments
>> in the meantime.
>
> From here:
> http://www.postgresq
Igor Sosa Mayor writes:
> Igor Sosa Mayor writes:
>
>> My question is therefore:
>> 1. is there a way to permit the pl/python to connect to the internet all
>>the time and with a better configuration?
>> 2. or should I forget the procedure and write a python script outside
>>the database
On 08/23/2015 01:15 PM, Igor Sosa Mayor wrote:
Igor Sosa Mayor writes:
My question is therefore:
1. is there a way to permit the pl/python to connect to the internet all
the time and with a better configuration?
2. or should I forget the procedure and write a python script outside
the
Igor Sosa Mayor writes:
> My question is therefore:
> 1. is there a way to permit the pl/python to connect to the internet all
>the time and with a better configuration?
> 2. or should I forget the procedure and write a python script outside
>the database?
I want to update the situation
In cases like this I normally restart the progresql under strace/truss
etc and then wade through the output, it will normally tell me which
process was invoked.
On 23/08/15 18:49, Tom Lane wrote:
> Igor Sosa Mayor writes:
>> Adrian Klaver writes:
>>> Or more to the point how where they built?
>>
On 8/23/2015 10:49 AM, Tom Lane wrote:
However, what this smells like to me is a permissions problem. I think
you were way too quick to dismiss the idea that SELinux (or something
just like it) is restricting outbound internet connections from Postgres.
It's standard for SELinux to be configured
Igor Sosa Mayor writes:
> Adrian Klaver writes:
>> Or more to the point how where they built?
> just installed with postgresql which comes with archlinux. I did not
> built anything. But, really: I dont think the problem is plpython2u o 3:
> 1. I have in my system both and both have the same lib
On 08/23/2015 10:38 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
I tried both... in my system (archlinux) there is plpython2u and
plpythonu. I think the 2nd one is python3.
How did they get there?
Or more to the point how where they built?
just installed with postgresql which comes wi
Adrian Klaver writes:
> What is the default system Python?
python3. But see my other answer. I dont think this is the problem.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Adrian Klaver writes:
>> I tried both... in my system (archlinux) there is plpython2u and
>> plpythonu. I think the 2nd one is python3.
>
> How did they get there?
>
> Or more to the point how where they built?
just installed with postgresql which comes with archlinux. I did not
built anything.
On 23 August 2015 at 18:59, Igor Sosa Mayor
wrote:
> s d writes:
>
> > It might be a dumb thought, but...
>
> thanks. There are not dumb thoughts with such problems...
>
> > Did you run the script from ipython as postgres user?
> > External programs called by triggers run as postgres, and maybe
On 08/23/2015 10:02 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
I tried it here, using your functions, and could not get it to fail:
well... i'm happy my function is working... my 1. procedure in PG... Now
maybe I'm able to get it working in my laptop...
So it is something to do with
On 08/23/2015 09:53 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
What happens if you run the function below directly in psql and not
through the trigger?
exactly the same error.
Do you have both Python 2 and Python 3 on this machine?
I have both.
Did you create both the 2u and 3u v
On 08/23/2015 09:53 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
What happens if you run the function below directly in psql and not
through the trigger?
exactly the same error.
Do you have both Python 2 and Python 3 on this machine?
I have both.
Did you create both the 2u and 3u v
Adrian Klaver writes:
> I tried it here, using your functions, and could not get it to fail:
well... i'm happy my function is working... my 1. procedure in PG... Now
maybe I'm able to get it working in my laptop...
> So it is something to do with the setup on your laptop.
yes, or the network I
s d writes:
> It might be a dumb thought, but...
thanks. There are not dumb thoughts with such problems...
> Did you run the script from ipython as postgres user?
> External programs called by triggers run as postgres, and maybe your
> postgres user doesn't have rights to reach the remote servi
Adrian Klaver writes:
> What happens if you run the function below directly in psql and not
> through the trigger?
exactly the same error.
> Do you have both Python 2 and Python 3 on this machine?
I have both.
> Did you create both the 2u and 3u variants of plpythonu?
I tried both... in my
"Charles Clavadetscher" writes:
>> Yes, exactly the same code. Exactly the same query: two consoles, one with
>> postgres, other with ipython. Postgres gives the error; ipython works.
>
> Somehow I expected that answer. I am not a python expert, but it happens
> that different pieces of code at t
On 08/23/2015 12:09 AM, Igor Sosa Mayor wrote:
"Charles Clavadetscher" writes:
Are you sure that you really use exactly the same code? The indication
"survice unknown" seems to point to an error in the URL and not to an
authorization problem. Maybe some encoding problem?
THnaks for your hint
It might be a dumb thought, but...
Did you run the script from ipython as postgres user?
External programs called by triggers run as postgres, and maybe your
postgres user doesn't have rights to reach the remote service.
Regards,
Sandor
On 23 August 2015 at 09:09, Igor Sosa Mayor
wrote:
> "Ch
On 08/23/2015 12:09 AM, Igor Sosa Mayor wrote:
"Charles Clavadetscher" writes:
Are you sure that you really use exactly the same code? The indication
"survice unknown" seems to point to an error in the URL and not to an
authorization problem. Maybe some encoding problem?
THnaks for your hint
Hi
Weird. According to
http://geopy.readthedocs.org/en/latest/#geopy.exc.GeocoderServiceError this
is the most generic exception, only used when there is not a more specific
one (which include by the way problems caused by connectivity and
authorization). The message of the exception is supposed t
"Charles Clavadetscher" writes:
> Are you sure that you really use exactly the same code? The indication
> "survice unknown" seems to point to an error in the URL and not to an
> authorization problem. Maybe some encoding problem?
THnaks for your hints.
Yes, exactly the same code. Exactly the s
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Igor Sosa Mayor
> Sent: Sonntag, 23. August 2015 07:22
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Problem with pl/python procedure
Adrian Klaver writes:
> Are you taking lack of coordinates in the table as evidence of no
> connection or are you determining that some other way?
thanks again for your answer. The evidence is very easy. I get this[1].
BUT: if I try exactly the same python code in a console there is no
error and
On 08/22/2015 10:16 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
Is the function you show here:
http://pastie.org/10366558
the actual function you are using in the trigger?
If so, there is no mechanism for getting the location coordinates into
the table, if that is what you want.
th
Adrian Klaver writes:
> Is the function you show here:
>
> http://pastie.org/10366558
>
> the actual function you are using in the trigger?
>
> If so, there is no mechanism for getting the location coordinates into
> the table, if that is what you want.
>
this is the function and there is a tri
On 08/22/2015 12:23 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
Does the code work reliably outside Postgres?
It seems you are reliant on the availability of the OpenStreetMap
service and its ability to provide a timely response.
So what exactly is the trigger event, INSERT, UPDATE, both
John R Pierce writes:
> On 8/22/2015 12:23 AM, Igor Sosa Mayor wrote:
>> Somehow I have the impression postgres is trying to make a connection
>> without having to rights to get the answer (I'm on linux). I dont
>> understand exactly which process (and with which rights) is executing
>> the plpyt
On 8/22/2015 12:23 AM, Igor Sosa Mayor wrote:
Somehow I have the impression postgres is trying to make a connection
without having to rights to get the answer (I'm on linux). I dont
understand exactly which process (and with which rights) is executing
the plpython procedure...
Thanks in any case
Adrian Klaver writes:
> Does the code work reliably outside Postgres?
> It seems you are reliant on the availability of the OpenStreetMap
> service and its ability to provide a timely response.
>
> So what exactly is the trigger event, INSERT, UPDATE, both?
>
> Is it absolutely necessary that thi
On 08/21/2015 08:38 AM, Igor Sosa Mayor wrote:
Adrian Klaver writes:
Are you talking about getting data into the procedure, or out of it,
or both?
[...]
(I reduce your email only to this question in order to be clearer; sorry
for this).
thanks for your answer.
To your questions: my setup i
Adrian Klaver writes:
> Are you talking about getting data into the procedure, or out of it,
> or both?
[...]
(I reduce your email only to this question in order to be clearer; sorry
for this).
thanks for your answer.
To your questions: my setup is very easy and primitive:
1. postgres is in my
John R Pierce writes:
> listen_addresses should only affect the interfaces that the postgres
> server is listening to connections from. as long as your app is on
> the same machine, and uses localhost:someport to connect to the
> postgres server, then the default listen_addresses='localhost' sh
On 08/21/2015 12:34 AM, John R Pierce wrote:
listen_addresses should only affect the interfaces that the postgres
server is listening to connections from. as long as your app is on the
same machine, and uses localhost:someport to connect to the postgres
server, then the default listen_addresses
On 08/20/2015 10:30 PM, Igor Sosa Mayor wrote:
Hi,
I'm a beginner with pgsql and have the following problem. I have written
a pl/python procedure to query geolocations (with the library geopy). It
inserts them into a table. All this works perfectly.
The problem is the configuration with the net
listen_addresses should only affect the interfaces that the postgres
server is listening to connections from. as long as your app is on the
same machine, and uses localhost:someport to connect to the postgres
server, then the default listen_addresses='localhost' should be sufficient.'
if you
41 matches
Mail list logo