Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Karsten Hilbert
On Thu, Dec 08, 2016 at 07:47:56PM -0500, Metare Solve wrote: > But, what I'm gathering is, you think this is a crutch too. Will Python > enable me to do the same things that I do with that kind of big data > processing program? Yes and no. Python will enable you to do _way_ more (because you tel

[GENERAL] How to loop through multi-dimentional array in PL/PGSQL

2016-12-08 Thread VENKTESH GUTTEDAR
Hello, Please help me in accessing multi-dimentional array in postgresql PL/PGSQL. for i in array_lower(product_list, 1) .. array_upper(product_list, 1) LOOP product_list[i][0]; END LOOP; Is the above code right? Or is there any other way to access, i am getting

Re: [GENERAL] Would like to below scenario is possible for getting page/block corruption

2016-12-08 Thread Sreekanth Palluru
Correcting typos Michael, Thanks for your prompt reply In my environment those two parameters are enabled . Just give you brief of PG database envornment Version 9.2.4.1 Windows 7 Professional SP1 fsync=on full_page_writes=on wal_sync_method=open_datasync My Customer is into building Cancer relat

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Tom Lane
Adrian Klaver writes: > On 12/08/2016 04:47 PM, Igor Korot wrote: >> Igors-MacBook-Air:dbhandler igorkorot$ psql -U postgres -d postgres >> psql: could not connect to server: No such file or directory >> Is the server running locally and accepting >> connections on Unix domain socket "/var/pgsql_s

Re: [GENERAL] Would like to below scenario is possible for getting page/block corruption

2016-12-08 Thread Sreekanth Palluru
Michael, Thanks for your prompt reply In my environment those two parameters are enabled . Just give you brief of PG database envornment Version 9.2.4.1 Windows 7 Professional SP1 fsync=on full_page_writes=on wal_sync_method=open_datasync My Customer is into building Cancer related systems and we

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Steve Litt
On Thu, 8 Dec 2016 17:08:41 -0800 (PST) Rich Shepard wrote: > On Thu, 8 Dec 2016, Adrian Klaver wrote: > > > GUI's only get you so far. At some point you will need to dive > > deeper to get what you. I am mostly a self taught > > programmer(biologist by training) so I understand the hill you are

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Adrian Klaver
On 12/08/2016 04:47 PM, Igor Korot wrote: Hi, guys, This is the result of running "SQL shell": [code] Last login: Thu Dec 8 19:46:41 on ttys001 Igors-MacBook-Air:~ igorkorot$ /Library/PostgreSQL/9.1/scripts/runpsql.sh; exit Server [localhost]: Database [postgres]: Port [5432]: Username [po

Re: [GENERAL] Would like to below scenario is possible for getting page/block corruption

2016-12-08 Thread Michael Paquier
(Please top-post that's annoying) On Fri, Dec 9, 2016 at 10:28 AM, Sreekanth Palluru wrote: > Can I generalize that, if after step 4) page ( new page or old page) got > written disk from buffer and crash happens between step 4) and 5) we > always get > block corruption issues with Postgres wh

Re: [GENERAL] Would like to below scenario is possible for getting page/block corruption

2016-12-08 Thread Sreekanth Palluru
Michael, Can I generalize that, if after step 4) page ( new page or old page) got written disk from buffer and crash happens between step 4) and 5) we always get block corruption issues with Postgres which can only be recovered by setting zero_damaged_pages if we just have pg_dump backups and w

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Adrian Klaver
On 12/08/2016 05:14 PM, Metare Solve wrote: I'm happy with postgres. It came recommended by a girl whose skills I totally respect. When i told my old boss I was going to use it, she redirected me to MySQL because that's what our CRM used. I've always looked back at postgres, though, and for some

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Metare Solve
I'm happy with postgres. It came recommended by a girl whose skills I totally respect. When i told my old boss I was going to use it, she redirected me to MySQL because that's what our CRM used. I've always looked back at postgres, though, and for some reason like it, conceptually, better.

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Rich Shepard
On Thu, 8 Dec 2016, Metare Solve wrote: Will Python enable me to do the same things that I do with that kind of big data processing program? Yes. I need SOMETHING to use for analysis for the tests I'm going to have to take when I job hunt so I'm exploring KNIME right now and doing the data

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Adrian Klaver
On 12/08/2016 04:47 PM, Metare Solve wrote: I'll check out the django girls, thanks. There's also a group of women coders in DC who hold a lot of trainings and events. I'll see if they have a level I python coming up. You made me think about something about the GUI's: In my old job I used altery

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Rich Shepard
On Thu, 8 Dec 2016, Adrian Klaver wrote: GUI's only get you so far. At some point you will need to dive deeper to get what you. I am mostly a self taught programmer(biologist by training) so I understand the hill you are facing. The language I use is Python, mainly because to me it made sense. F

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread John R Pierce
On 12/8/2016 4:45 PM, Adrian Klaver wrote: I don't know anything about Tableau, but I don't see anything on their fluff-heavy website mentioning postgresql, rather, it all seems http://onlinehelp.tableau.com/current/pro/desktop/en-us/help.htm#examples_postgresql.html ah, more digging... the D

Re: [GENERAL] Would like to below scenario is possible for getting page/block corruption

2016-12-08 Thread Michael Paquier
On Fri, Dec 9, 2016 at 9:46 AM, Sreekanth Palluru wrote: > Hi , > I am working on page corruption issue want to know if below scenario is > possible > > 1) Insert command from client , I understand heap_insert is called from > heampam.c > 2) Let us say table is full and relation is extended and a

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Metare Solve
I'll check out the django girls, thanks. There's also a group of women coders in DC who hold a lot of trainings and events. I'll see if they have a level I python coming up. You made me think about something about the GUI's: In my old job I used alteryx because we were working with datasets from 2

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
Hi, guys, On Thu, Dec 8, 2016 at 10:19 AM, Charles Clavadetscher wrote: > Hello > >> -Original Message- >> From: pgsql-general-ow...@postgresql.org >> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver >> Sent: Donnerstag, 8. Dezember 2016 16:09 >> To: Igor Korot >>

[GENERAL] Would like to below scenario is possible for getting page/block corruption

2016-12-08 Thread Sreekanth Palluru
Hi , I am working on page corruption issue want to know if below scenario is possible 1) Insert command from client , I understand heap_insert is called from heampam.c 2) Let us say table is full and relation is extended and added a new block 3) Tuple is inserted into new page for the block Relat

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Adrian Klaver
On 12/08/2016 04:39 PM, John R Pierce wrote: On 12/8/2016 4:19 PM, Metare Solve wrote: - The project is to build my Tableau skills, for one. There are a lot of (work from home) jobs out there that call for Tableau skills and I know the best way to learn something is to do it. I think using the S

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread John R Pierce
On 12/8/2016 4:19 PM, Metare Solve wrote: - The project is to build my Tableau skills, for one. There are a lot of (work from home) jobs out there that call for Tableau skills and I know the best way to learn something is to do it. I think using the SQL database as a source will enable me to le

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Adrian Klaver
On 12/08/2016 04:19 PM, Metare Solve wrote: Sorry, I got on so many lists yesterday. I'm really not that dense. I have absolutely no language programming skills and it is very very frustrating. I can HTML and that's it. I desperately want to develop the skills but whenever I try on my own, I hit

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Metare Solve
Sorry, I got on so many lists yesterday. I'm really not that dense. I have absolutely no language programming skills and it is very very frustrating. I can HTML and that's it. I desperately want to develop the skills but whenever I try on my own, I hit the same wall as I do with SQL. I'm just bad

Re: [GENERAL] Looking for an online mentor

2016-12-08 Thread Adrian Klaver
On 12/08/2016 03:46 PM, Metare Solve wrote: Hi, I'm looking for an online mentor, someone I can chat/email and ask questions of. Maybe "meet up" and have a direct chat. I've been trying to get into SQL for years and I just... have... problems. It's very frustrating and at this point in my career

[GENERAL] Looking for an online mentor

2016-12-08 Thread Metare Solve
Hi, I'm looking for an online mentor, someone I can chat/email and ask questions of. Maybe "meet up" and have a direct chat. I've been trying to get into SQL for years and I just... have... problems. It's very frustrating and at this point in my career is going to keep me from getting a new job. (

Re: [GENERAL] How to config start/stop scripts in a different data dir for CentOS7/systemctl/PG9.6

2016-12-08 Thread Julien Rouhaud
On Thu, Dec 08, 2016 at 05:16:11PM -0300, Edilmar LISTAS wrote: > I decided to use the pg_ctl to start/stop, I didn't find a way to > configure systemctl script. I didn't noticed your first mail. You can find all needed informations on this blog post: https://people.planetpostgresql.org/devrim/in

Re: [GENERAL] How to config start/stop scripts in a different data dir for CentOS7/systemctl/PG9.6

2016-12-08 Thread Edilmar LISTAS
I decided to use the pg_ctl to start/stop, I didn't find a way to configure systemctl script. Em 05-12-2016 15:21, Edilmar LISTAS escreveu: Hi, I do these steps to config Postgresql 9.6 in CentOS 6.x using a different data directory: yum -y install postgresql96-server postgresql96-contrib pg_t

Re: [GENERAL] PDF files: to store in database or not

2016-12-08 Thread Rich Shepard
On Thu, 8 Dec 2016, Chris Travers wrote: Assuming relatively small files, bytea makes much more sense than a large object. Hi Chris, Most of the documents are only a few pages in size. LOBs work best when you need a streaming interface (seek and friends) while bytea's are otherwise much m

Re: [GENERAL] PDF files: to store in database or not

2016-12-08 Thread John DeSoi
> On Dec 8, 2016, at 9:25 AM, Chris Travers wrote: > > Assuming relatively small files, bytea makes much more sense than a large > object. However note that encoding and decoding can be relatively memory > intensive depending on your environment. This is not a problem with small > files and

Re: [GENERAL] PDF files: to store in database or not

2016-12-08 Thread Rich Shepard
On Thu, 8 Dec 2016, Adrian Klaver wrote: http://initd.org/psycopg/docs/usage.html?highlight=binary#adapt-binary Thanks again, Adrian. Rich -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-g

Re: [GENERAL] PDF files: to store in database or not

2016-12-08 Thread Chris Travers
On Thu, Dec 8, 2016 at 7:16 AM, Rich Shepard wrote: > On Thu, 8 Dec 2016, John DeSoi wrote: > > I have been storing PDFs in Postgres for several years without any >> problems. Documents range in size from a few pages to 100+ pages. I'm >> using a bytea column, not large objects. I store the docum

Re: [GENERAL] PDF files: to store in database or not

2016-12-08 Thread Adrian Klaver
On 12/08/2016 07:16 AM, Rich Shepard wrote: On Thu, 8 Dec 2016, John DeSoi wrote: I have been storing PDFs in Postgres for several years without any problems. Documents range in size from a few pages to 100+ pages. I'm using a bytea column, not large objects. I store the documents in a separate

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Charles Clavadetscher
Hello > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver > Sent: Donnerstag, 8. Dezember 2016 16:09 > To: Igor Korot > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Importing SQLite database

Re: [GENERAL] PDF files: to store in database or not

2016-12-08 Thread Rich Shepard
On Thu, 8 Dec 2016, John DeSoi wrote: I have been storing PDFs in Postgres for several years without any problems. Documents range in size from a few pages to 100+ pages. I'm using a bytea column, not large objects. I store the documents in a separate database from the rest of the application da

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Adrian Klaver
On 12/08/2016 07:02 AM, Igor Korot wrote: Adrian, Anything else you see? Does Postgres uses single quotes for literal values or double quotes? Single: https://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html I'm talking about INSERT INTO... VALUES(); statements. SQLite does u

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Adrian Klaver
On 12/08/2016 06:54 AM, Igor Korot wrote: Adrian, On Thu, Dec 8, 2016 at 9:47 AM, Adrian Klaver wrote: On 12/08/2016 04:54 AM, Igor Korot wrote: Hi, ALL, I have a text file which I got from exporting the SQLite database. The file contains an SQL statement which will generate the database.

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
Adrian, On Thu, Dec 8, 2016 at 9:54 AM, Igor Korot wrote: > Adrian, > > On Thu, Dec 8, 2016 at 9:47 AM, Adrian Klaver > wrote: >> On 12/08/2016 04:54 AM, Igor Korot wrote: >>> >>> Hi, ALL, >>> I have a text file which I got from exporting the SQLite database. >>> >>> The file contains an SQL st

Re: [GENERAL] Who dropped a role?

2016-12-08 Thread Melvin Davidson
On Thu, Dec 8, 2016 at 4:34 AM, Charles Clavadetscher < clavadetsc...@swisspug.org> wrote: > Hello > > > > *From:* pgsql-general-ow...@postgresql.org [mailto:pgsql-general-owner@ > postgresql.org] *On Behalf Of *Durumdara > *Sent:* Donnerstag, 8. Dezember 2016 10:13 > *To:* pgsql-general@postgresq

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
Adrian, On Thu, Dec 8, 2016 at 9:47 AM, Adrian Klaver wrote: > On 12/08/2016 04:54 AM, Igor Korot wrote: >> >> Hi, ALL, >> I have a text file which I got from exporting the SQLite database. >> >> The file contains an SQL statement which will generate the database. > > > Is there a CREATE DATABASE

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread Adrian Klaver
On 12/08/2016 04:54 AM, Igor Korot wrote: Hi, ALL, I have a text file which I got from exporting the SQLite database. The file contains an SQL statement which will generate the database. Is there a CREATE DATABASE statement in the file you are referencing? Otherwise you will have to create th

Re: [GENERAL] PDF files: to store in database or not

2016-12-08 Thread John DeSoi
> On Dec 6, 2016, at 1:09 PM, Eric Schwarzenbach > wrote: > > I've often wondered if we'd have been better off storing the files in the > database. This design decision was made some years ago, and our concerns > around this had to do with performance, but I don't know that we had any real >

Re: [GENERAL] Importing SQLite database

2016-12-08 Thread William Ivanski
OmniDB [1] is able to convert databases from one RDBMS to another. I suggest you perform a conversion from your SQLite file to a PostgreSQL database. This page [2] can help you on how to add connections to OmniDB and this other page [3] explains how to use the convert feature. [1] http://www.omnid

Re: [GENERAL] When to use COMMENT vs --

2016-12-08 Thread Rich Shepard
On Thu, 8 Dec 2016, Charles Clavadetscher wrote: IMHO the fact mentioned by Chris Travers that comments on objects included in the database can be used by tools to generate the documentation is probably the most important (besides their being persisted). Charles, Chris' contribution was the

Re: [GENERAL] FreeBSD 10 => 11: Dump and reload your PostgreSQL database unless you like it broken

2016-12-08 Thread Tim Clarke
On 07/12/16 21:20, Rob Sargent wrote: > > > On 12/07/2016 02:06 PM, Kevin Grittner wrote: >> I would be much happier if most developers understood the >> difference between a character set (e.g., Unicode) and a character >> encoding scheme (e.g., UTF-8 or UTF-16) and how the two concepts >> relate.

[GENERAL] Importing SQLite database

2016-12-08 Thread Igor Korot
Hi, ALL, I have a text file which I got from exporting the SQLite database. The file contains an SQL statement which will generate the database. Excerpt from this file: [code] CREATE TABLE leagues( id INTEGER AUTOINCREMENT PRIMARY KEY, name VARCHAR(100),balance DOUBLE(10,2)); CREATE TABLE player

Re: [GENERAL] pgbasebackup necessary for master slave change?

2016-12-08 Thread Michael Paquier
On Thu, Dec 8, 2016 at 7:08 PM, Chris Travers wrote: > > > On Thu, Dec 8, 2016 at 11:01 AM, Subhankar Chattopadhyay > wrote: >> >> pg_rewind cannot be used as I am on 9.4. >> >> Anything else? > > > Upgrade to 9.5 or 9.6? ;-) > > This is a known limitation in Postgres that pg_rewind was written t

Re: [GENERAL] max_connections limit violation not showing in pg_stat_activity

2016-12-08 Thread Charles Clavadetscher
Hello Kevin Getting back at this. > -Original Message- > From: Kevin Grittner [mailto:kgri...@gmail.com] > Sent: Mittwoch, 23. November 2016 17:04 > To: Charles Clavadetscher > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] max_connections limit violation not showing in > pg_

Re: [GENERAL] pgbasebackup necessary for master slave change?

2016-12-08 Thread Chris Travers
On Thu, Dec 8, 2016 at 11:01 AM, Subhankar Chattopadhyay < subho@gmail.com> wrote: > pg_rewind cannot be used as I am on 9.4. > > Anything else? > Upgrade to 9.5 or 9.6? ;-) This is a known limitation in Postgres that pg_rewind was written to address. > > On Thu, Dec 8, 2016 at 3:23 PM, Ach

Re: [GENERAL] pgbasebackup necessary for master slave change?

2016-12-08 Thread Subhankar Chattopadhyay
pg_rewind cannot be used as I am on 9.4. Anything else? On Thu, Dec 8, 2016 at 3:23 PM, Achilleas Mantzios wrote: > On 08/12/2016 11:33, Subhankar Chattopadhyay wrote: >> >> Hi, >> >> Few days back I had asked if it is needed to to pg_basebackup for >> every database update. From John I understo

Re: [GENERAL] pgbasebackup necessary for master slave change?

2016-12-08 Thread Achilleas Mantzios
On 08/12/2016 11:33, Subhankar Chattopadhyay wrote: Hi, Few days back I had asked if it is needed to to pg_basebackup for every database update. From John I understood that it is unnecessary and if the slave is syncing, even if it is catching up, it would be able to sync without doing pg_basebac

Re: [GENERAL] pgbasebackup necessary for master slave change?

2016-12-08 Thread Subhankar Chattopadhyay
I am on 9.4. Doesn't look like we have it available on 9.4. Do we have any other option? On Thu, Dec 8, 2016 at 3:15 PM, Chris Travers wrote: > > > On Thu, Dec 8, 2016 at 10:33 AM, Subhankar Chattopadhyay > wrote: >> >> Hi, >> >> Few days back I had asked if it is needed to to pg_basebackup for

Re: [GENERAL] pgbasebackup necessary for master slave change?

2016-12-08 Thread Chris Travers
On Thu, Dec 8, 2016 at 10:33 AM, Subhankar Chattopadhyay < subho@gmail.com> wrote: > Hi, > > Few days back I had asked if it is needed to to pg_basebackup for > every database update. From John I understood that it is unnecessary > and if the slave is syncing, even if it is catching up, it wou

Re: [GENERAL] Who dropped a role?

2016-12-08 Thread Charles Clavadetscher
Hello From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Durumdara Sent: Donnerstag, 8. Dezember 2016 10:13 To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Who dropped a role? Hello! Sorry, meanwhile I found it as Group Role. I ne

[GENERAL] pgbasebackup necessary for master slave change?

2016-12-08 Thread Subhankar Chattopadhyay
Hi, Few days back I had asked if it is needed to to pg_basebackup for every database update. From John I understood that it is unnecessary and if the slave is syncing, even if it is catching up, it would be able to sync without doing pg_basebackup. This is working also for me. However, for a fail

Re: [GENERAL] Who dropped a role?

2016-12-08 Thread Durumdara
Hello! Sorry, meanwhile I found it as Group Role. I never used this kind of role. How to restore it to normal login role? Thanks for it! dd 2016-12-08 9:53 GMT+01:00 Durumdara : > Dear PG Masters! > > In a server today I didn't find an important role. > I don't know what my colleagues did with

[GENERAL] Who dropped a role?

2016-12-08 Thread Durumdara
Dear PG Masters! In a server today I didn't find an important role. I don't know what my colleagues did with it, but it seems to be lost. Do you know a trick, how get info about it? 1.) Who dropped it? 2.) If not dropped what happened with it? Does role dropping logged somewhere? Thanks for you