SOLVED: [GENERAL] Trying to solve a SocketError [Errno 13] Permission with PL/Python in PostgreSQL 9.3

2015-05-24 Thread Marcos Ortiz
Regards, Adrian, Tom and all pgsql-general list. Like Tom said, the problem was with SELinux and I found the policy which caused all problems: grep denied audit.log | audit2allow #= postgresql_t == # This avc can be allowed using the boolean 'nis_enabled' allow pos

Re: [GENERAL] Trying to solve a SocketError [Errno 13] Permission with PL/Python in PostgreSQL 9.3

2015-05-24 Thread Adrian Klaver
On 05/24/2015 04:15 PM, Marcos Ortiz wrote: Sorry for the late response. Not sure if it applies but see here: http://neo4j.com/docs/stable/rest-api-security.html "When Neo4j is first installed you can authenticate with the default user neo4j and the default password neo4j. However, the defa

Re: [GENERAL] Trying to solve a SocketError [Errno 13] Permission with PL/Python in PostgreSQL 9.3

2015-05-24 Thread Marcos Ortiz
Sorry for the late response. On 23/05/15 19:38, Adrian Klaver wrote: On 05/23/2015 04:16 PM, Marcos Ortiz wrote: On 23/05/15 19:09, Adrian Klaver wrote: On 05/23/2015 03:51 PM, Marcos Ortiz wrote: On 23/05/15 18:40, Adrian Klaver wrote: On 05/23/2015 03:27 PM, Marcos Ortiz wrote: Regard

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Scott Marlowe
On Sun, May 24, 2015 at 4:26 AM, Arup Rakshit wrote: > Hi, > > I am copying the data from a CSV file to a Table using "COPY" command. But > one thing that I got stuck, is how to skip duplicate records while copying > from CSV to tables. By looking at the documentation, it seems, Postgresql > do

Re: [GENERAL] Re: Server tries to read a different config file than it is supposed to

2015-05-24 Thread Tom Lane
twoflower writes: > I was doing this after I upgraded to 9.4.2, yes. As for the shut down: I > suspect the server was rebooted without explicitly stopping Postgres. Not > sure how this plays out in terms of cleanliness. This is everything relevant > in the log file after I ran the start script: >

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Francisco Olarte
Hi Arup On Sun, May 24, 2015 at 12:26 PM, Arup Rakshit wrote: > I am copying the data from a CSV file to a Table using "COPY" command. But > one thing that I got stuck, is how to skip duplicate records while copying > from CSV to tables. By looking at the documentation, it seems, Postgresql >

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Arup Rakshit
On Sunday, May 24, 2015 07:52:43 AM you wrote: > >> > >> Is it if the entire row is duplicated? > > > > It is entire row. > > So, Olivers second solution. > I have done this : columns_t1 = self.singleton_class.fields.map { |f| "t1.#{f}" }.join(",") columns_t2 = self.singleton_class.fields.map

Re: [GENERAL] PG and undo logging

2015-05-24 Thread Tom Lane
Ravi Krishna writes: > Thanks for the detailed explanation. The explanation makes me wonder > that PG must do more work at commit time, right? No. Commit and abort are both O(1). Where we pay the piper is in having to run VACUUM to clean up no-longer-needed row versions. This is a better desig

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Adrian Klaver
On 05/24/2015 06:24 AM, Arup Rakshit wrote: On Sunday, May 24, 2015 07:24:41 AM you wrote: On 05/24/2015 04:55 AM, Arup Rakshit wrote: On Sunday, May 24, 2015 02:52:47 PM you wrote: On Sun, 2015-05-24 at 16:56 +0630, Arup Rakshit wrote: Hi, I am copying the data from a CSV file to a Table us

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Arup Rakshit
On Sunday, May 24, 2015 07:24:41 AM you wrote: > On 05/24/2015 04:55 AM, Arup Rakshit wrote: > > On Sunday, May 24, 2015 02:52:47 PM you wrote: > >> On Sun, 2015-05-24 at 16:56 +0630, Arup Rakshit wrote: > >>> Hi, > >>> > >>> I am copying the data from a CSV file to a Table using "COPY" command. >

Re: [GENERAL] Enum in foreign table: error and correct way to handle.

2015-05-24 Thread Peter Swartz
Thank you for the message Tom; sounds great. I'll try that out, will check on the planner's resultant behavior and email back. Peter On Sat, May 23, 2015 at 12:35 PM, Tom Lane wrote: > Peter Swartz writes: > > suppose the foreign database adds a value to the enum, and the foreign > > table no

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Adrian Klaver
On 05/24/2015 04:55 AM, Arup Rakshit wrote: On Sunday, May 24, 2015 02:52:47 PM you wrote: On Sun, 2015-05-24 at 16:56 +0630, Arup Rakshit wrote: Hi, I am copying the data from a CSV file to a Table using "COPY" command. But one thing that I got stuck, is how to skip duplicate records while co

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread rob stone
> I think I need to ask more specific way. I have a table say `table1`, where I > feed data from different CSV files. Now suppose I have inserted N records to > my table `table1` from csv file `c1`. This is ok, next time when again I am > importing from a different CSV file say `c2` to `table1`

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Oliver Elphick
On Sun, 2015-05-24 at 18:25 +0630, Arup Rakshit wrote: > > > > Assuming you are using Unix, or can install Unix tools, run the input > > files through > > > > sort -u > > > > before passing them to COPY. > > > > Oliver Elphick > > > > I think I need to ask more specific way. I have a table

Re: [GENERAL] PG and undo logging

2015-05-24 Thread Ravi Krishna
On Sat, May 23, 2015 at 10:12 PM, Scott Marlowe wrote: > Ever run an insert with 1M rows, and roll it back in postgresql and > compare that to oracle. Time the rollback in both. That should give > you an idea of how differently the two dbs operate. > > A rollback in postgres is immediate because

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Arup Rakshit
On Sunday, May 24, 2015 02:52:47 PM you wrote: > On Sun, 2015-05-24 at 16:56 +0630, Arup Rakshit wrote: > > Hi, > > > > I am copying the data from a CSV file to a Table using "COPY" command. > > But one thing that I got stuck, is how to skip duplicate records while > > copying from CSV to tables.

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Oliver Elphick
On Sun, 2015-05-24 at 16:56 +0630, Arup Rakshit wrote: > Hi, > > I am copying the data from a CSV file to a Table using "COPY" command. > But one thing that I got stuck, is how to skip duplicate records while > copying from CSV to tables. By looking at the documentation, it seems, > Postgresql don

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-24 Thread Francisco Olarte
Hi Daniel: Bill Moran already pointed out some things, I more or less agree with him On Sun, May 24, 2015 at 12:16 AM, Daniel Begin wrote: .. > I use pgadmin_III sql window. I'll just point from my experience. At work, more than three fourths of the problems I've had to help my pgadmin

[GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using "COPY"

2015-05-24 Thread Arup Rakshit
Hi, I am copying the data from a CSV file to a Table using "COPY" command. But one thing that I got stuck, is how to skip duplicate records while copying from CSV to tables. By looking at the documentation, it seems, Postgresql don't have any inbuilt too to handle this with "copy" command. By d

Re: [GENERAL] FW: Constraint exclusion in partitions

2015-05-24 Thread Francisco Olarte
Hi Daniel: On Sat, May 23, 2015 at 8:37 PM, Daniel Begin wrote: > Following Francisco suggestion, I was able to do some tests earlier this > morning when the partitioning process completed and all the resulting tables > analyzed. > Here is what I got on both the original table and its partiti

[GENERAL] Re: Server tries to read a different config file than it is supposed to

2015-05-24 Thread twoflower
> From root, presumably ... Yes > I thought of a different theory: maybe the server's complaint is not due > to trying to read that file as a config file, but it's just because there > is an unreadable/unwritable file in the data directory. See Christoph > Berg's complaint at > http://www.post