Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread Dick Kniep
As a long time user of the combination, Postgresql, Python, Django, Flask etc. here are my 2 cents: The frameworks of python; Django (enormous) or Flask (smaller) and there are more, are of superb quality, battle hardened and are used in many many companies and high volume sites around the wor

Re: [GENERAL] Convert from LATIN9 to UTF-8 / WAL Replication

2017-05-10 Thread Magnus Hagander
On Wed, May 10, 2017 at 5:05 AM, Fabrízio de Royes Mello < fabri...@timbira.com.br> wrote: > > Em ter, 9 de mai de 2017 às 17:40, basti > escreveu: > >> Hello, >> >> I must convert a Latin9 Pg-cluster (Version 9.1) in utf-8 with minimal >> downtime, if possible. >> My idea is to use WAL replicati

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread Karsten Hilbert
On Mon, May 08, 2017 at 05:45:53PM -0700, Paul Hughes wrote: > Why are Postgres and Python so married, I dare say that's a misconception. However, Python "works so well", that "professional amateurs" (like myself) who gravitate towards PostgreSQL for the obvious reasons might tend to chose Pytho

[GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Ron Ben
I'm about to upgrade my postgresql to the latest 9.3 version   On my test server eveything works. However I want to save a backup of my production server before the upgrade... I'm not sure how I do that.   It says that only system files are changed during upgrade... which folders exactly I need to

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Adrian Klaver
On 05/10/2017 06:08 AM, Ron Ben wrote: I'm about to upgrade my postgresql to the latest 9.3 version On my test server eveything works. However I want to save a backup of my production server before the upgrade... I'm not sure how I do that. https://www.postgresql.org/docs/9.3/static/app-pg-du

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread Paul Hughes
Thank you all for taking the time to answer my questions. I've been out of the programming world for a long time, so I am back to being a newbie. I was told this is the place for newcomers to ask questions. I apologize if my questions did not contain the necessary sophistication or nuance for some

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Jan de Visser
On Wednesday, May 10, 2017 9:08:16 AM EDT Ron Ben wrote: > Ron, You need to figure out how you can make your email client send something else than base64 encoded HTML with right-aligned text. Your messages are so hard to parse for me I just ignore them, and I assume there's other people t

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread Adrian Klaver
On 05/09/2017 01:00 PM, Paul Hughes wrote: Thank you all for taking the time to answer my questions. I've been out of the programming world for a long time, so I am back to being a newbie. I was told this is the place for newcomers to ask questions. I apologize if my questions did not contain t

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Ron Ben
I think you miss understood me. pg_dump dumps the data. the tables, functions and the data saved in them. I have daily backups for this so i'm not worried.   What i'm woried about are the "executables files". These files are what is actualy being updated when you update the version. I want to be a

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Andreas Joseph Krogh
På onsdag 10. mai 2017 kl. 16:55:50, skrev Ron Ben mailto:ronb...@walla.co.il>>:   I think you miss understood me. pg_dump dumps the data. the tables, functions and the data saved in them. I have daily backups for this so i'm not worried.   What i'm woried about are the "executables files". These f

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Ron Ben
Not possible  https://www.postgresql.org/download/linux/debian/   To upgrade I do: apt-get install postgresql-9.3 There is no way to "roll back" from here. I can not choose which version to install, it install the latest version packed for debian. Currently its 9.3.16   The docuntation says that up

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Andreas Joseph Krogh
På onsdag 10. mai 2017 kl. 17:13:50, skrev Ron Ben mailto:ronb...@walla.co.il>>: Not possible  https://www.postgresql.org/download/linux/debian/   To upgrade I do: apt-get install postgresql-9.3 There is no way to "roll back" from here. I can not choose which version to install, it install the late

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread Alan Hodgson
On Wednesday 10 May 2017 17:13:50 Ron Ben wrote: > Not possible > https://www.postgresql.org/download/linux/debian/ > > To upgrade I do: apt-get install postgresql-9.3 > There is no way to "roll back" from here. > I can not choose which version to install, it install the latest version > packed

Re: [GENERAL] Logical decoding CPU-bound w/ large number of tables

2017-05-10 Thread Mathieu Fenniak
Hi Andres, Tom, Andres, it seems like the problem is independent of having large data manipulations mixed with schema changes. The below test case demonstrates it with just schema changes. Tom, I've tested your patch, and it seems to have a positive impact for sure. I've documented a test case

[GENERAL] character encoding of the postgres database

2017-05-10 Thread Sandeep Gupta
Currently, the postgres database by has SQL_ASCII encoding. psql -p 5771 postgres -l List of databases Name| Owner | Encoding | Collate | Ctype | Access privileges ---+-+---+-+---+- postgres | sandeep

Re: [GENERAL] Select from tableA - if not exists then tableB

2017-05-10 Thread Brian Dunavant
On Tue, May 9, 2017 at 6:00 PM, Patrick B wrote: > SELECT > split_part(n1.path::text, '/'::text, 18)::integer AS id, > split_part(n1.path::text, '/'::text, 14)::integer AS clientid, > lower(n1.md5::text)::character(32) AS md5, 0 AS cont, > '-1000-1000-3000-6000'::uuid AS guid, > n1

[GENERAL] relation create time

2017-05-10 Thread Hu, Patricia
I am trying to find out when a table was created in postgresql. Thought it would be easy (coming from Oracle world), but haven't had any luck, especially since we are on RDS and can't peek at the timestamp on the file system. Is this information stored anywhere in the catalog? Or I need to store

Re: [GENERAL] character encoding of the postgres database

2017-05-10 Thread Peter Eisentraut
On 5/10/17 11:48, Sandeep Gupta wrote: > Currently, the postgres database by has SQL_ASCII encoding. > Is it possible to start the postgres database with UTF-8 encoding, instead > of modifying it later. This is done when initdb is run, with the --locale and/or --encoding option. -- Peter Eisent

Re: [GENERAL] relation create time

2017-05-10 Thread Peter Eisentraut
On 5/10/17 12:05, Hu, Patricia wrote: > I am trying to find out when a table was created in postgresql. Thought > it would be easy (coming from Oracle world), but haven’t had any luck, > especially since we are on RDS and can’t peek at the timestamp on the > file system. Is this information stored

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread David G. Johnston
On Wed, May 10, 2017 at 8:13 AM, Ron Ben wrote: > Not possible > https://www.postgresql.org/download/linux/debian/ > > To upgrade I do: apt-get install postgresql-9.3 > There is no way to "roll back" from here. > I can not choose which version to install, it install the latest version > packed fo

Re: [GENERAL] character encoding of the postgres database

2017-05-10 Thread Adrian Klaver
On 05/10/2017 08:48 AM, Sandeep Gupta wrote: Currently, the postgres database by has SQL_ASCII encoding. psql -p 5771 postgres -l List of databases Name| Owner | Encoding | Collate | Ctype | Access privileges ---+-+---+-+

Re: [GENERAL] Upgrading postgresql minor version

2017-05-10 Thread David G. Johnston
On Wed, May 10, 2017 at 9:34 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, May 10, 2017 at 8:13 AM, Ron Ben wrote: > >> Not possible >> https://www.postgresql.org/download/linux/debian/ >> >> To upgrade I do: apt-get install postgresql-9.3 >> There is no way to "roll back"

Re: [GENERAL] logging of application level user in audit trigger

2017-05-10 Thread Rajesh Mallah
Hi Scott / List , Thanks for the response, the application_name usage seems to be more natural as it is something inbuilt. the audit trigger repo seems to have got update only in past 2 years . are there other more active projects doing the same thing ? in my opinion (which may be flawed) pgaud

Re: [GENERAL] logging of application level user in audit trigger

2017-05-10 Thread Rajesh Mallah
Ok , i do see there is already the handling of application_name in the trigger , this is quite sufficient for my current needs. regds mallah. On Wed, May 10, 2017 at 10:58 PM, Rajesh Mallah wrote: > Hi Scott / List , > > Thanks for the response, > > the application_name usage seems to be more

Re: [GENERAL] character encoding of the postgres database

2017-05-10 Thread Sandeep Gupta
Thank you. On Wed, May 10, 2017 at 12:54 PM, Adrian Klaver wrote: > On 05/10/2017 08:48 AM, Sandeep Gupta wrote: >> >> Currently, the postgres database by has SQL_ASCII encoding. >> >> psql -p 5771 postgres -l >> List of databases >>Name| Owner | Encoding |

Re: [GENERAL] relation create time

2017-05-10 Thread Hu, Patricia
Thanks for your prompt reply Peter. Sure I could write a trigger to capture and store it, but for such common functionalities seems to me it would be best to have it in the engine, vs. each application having to write its own trigger and reinvent the wheel. Is there any concerns on adding it

Re: [GENERAL] relation create time

2017-05-10 Thread Melvin Davidson
On Wed, May 10, 2017 at 12:31 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 5/10/17 12:05, Hu, Patricia wrote: > > I am trying to find out when a table was created in postgresql. Thought > > it would be easy (coming from Oracle world), but haven’t had any luck, > > especiall

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread Paul Hughes
Adrian Klaver Wrote: >>Many on this list(myself included) will want to know how you came to that conclusion and I am speaking as someone who uses Python, Django and Postgres. I came to that conclusion when I saw a list of the top 15 websites (based on traffic). On that list, *all* of the sites th

Re: [GENERAL] Logical decoding CPU-bound w/ large number of tables

2017-05-10 Thread Tom Lane
Mathieu Fenniak writes: > Andres, it seems like the problem is independent of having large data > manipulations mixed with schema changes. The below test case demonstrates > it with just schema changes. > Tom, I've tested your patch, and it seems to have a positive impact for > sure. I've docum

Re: [GENERAL] Logical decoding CPU-bound w/ large number of tables

2017-05-10 Thread Andres Freund
Hi Tom, Mathieu, On 2017-05-10 17:02:11 -0400, Tom Lane wrote: > Mathieu Fenniak writes: > > Andres, it seems like the problem is independent of having large data > > manipulations mixed with schema changes. The below test case demonstrates > > it with just schema changes. > > > Tom, I've teste

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread Gavin Flower
Hi Paul, See comments at the end... On 10/05/17 08:00, Paul Hughes wrote: Thank you all for taking the time to answer my questions. I've been out of the programming world for a long time, so I am back to being a newbie. Even if you stay in the game, technology changes - so one has to keep lea

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread Adrian Klaver
On 05/10/2017 12:46 PM, Paul Hughes wrote: Adrian Klaver Wrote: Many on this list(myself included) will want to know how you came to that conclusion and I am speaking as someone who uses Python, Django and Postgres. I came to that conclusion when I saw a list of the top 15 websites (based on

Re: [GENERAL] Python versus Other Languages using PostgreSQL

2017-05-10 Thread John R Pierce
On 5/10/2017 2:43 PM, Adrian Klaver wrote: 1) Uber 2)Yahoo 3) Instagram and, each of those giant businesses has their own entirely custom 'platforms', so its not really fair to call them 'largest web platforms' as each of those custom platforms is in use at only one business. Sure, larges

[GENERAL] Querying a policy

2017-05-10 Thread Jean-Francois Bernier
Hi all! We are evaluating migrating our software RLS to Postgres by using policies. Having a "FOR UPDATE POLICY" on a table, I was wondering if there is a way to know, before trying an Update and getting an error, if the current row can be updated ? The goal is to show or hide the edit button

Re: [GENERAL] Querying a policy

2017-05-10 Thread Stephen Frost
Jeff, * Jean-Francois Bernier (jean.francois.bern...@boreal-is.com) wrote: > We are evaluating migrating our software RLS to Postgres by using policies. Neat! > Having a "FOR UPDATE POLICY" on a table, I was wondering if there is a way to > know, before trying an Update and getting an error, if

Re: [GENERAL]

2017-05-10 Thread Igor Korot
Hi, guys, On Sun, May 7, 2017 at 1:40 PM, Igor Korot wrote: > David, > > On Sun, May 7, 2017 at 8:57 AM, David Rowley > wrote: >> On 8 May 2017 at 00:42, Igor Korot wrote: >>> Basically what I'd like to see is the definition of each column and >>> whether this column is >>> part of primary/fore

Re: [GENERAL]

2017-05-10 Thread John R Pierce
On 5/10/2017 7:45 PM, Igor Korot wrote: I found this:https://wiki.postgresql.org/wiki/Retrieve_primary_key_columns, but now I need to connect this with information_schema.columns. What is best way to do it? Or maybe that query I referenced is completely wrong? if you're using pg_catalog stuf

Re: [GENERAL]

2017-05-10 Thread Igor Korot
Hi, John et al, On Wed, May 10, 2017 at 11:02 PM, John R Pierce wrote: > On 5/10/2017 7:45 PM, Igor Korot wrote: >> >> I found >> this:https://wiki.postgresql.org/wiki/Retrieve_primary_key_columns, >> but now I need >> to connect this with information_schema.columns. >> >> What is best way to do

Re: [GENERAL] Postgres 9.6 Parallel Query

2017-05-10 Thread Rafia Sabih
On Thu, Apr 27, 2017 at 6:38 PM, basti wrote: > Hello, > > is there a recomment to set max_worker_processes and > max_parallel_workers_per_gather per cpu core or thread? > This largely depends on what type of processing is done by parallel workers, e.g. if the task is I/O bound then having workers