Re: [GENERAL] I lost my password

2015-07-27 Thread papa
After removing PostgreSQL and manually deleting all the other files installed by it I reinstalled PostgreSQL, I started the cmd.exe and typed psql, asked me for the password, entered it, but to no avail. I took notes of all the information I entered during the installation, so this time I'd be

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Melvin Davidson
If you are running Linux (please ALWAYS give the O/S ), then this could have been caused by the sys admin doing a system shutdown. Otherwise, anyone that can sudo to postgres could also have potentially issued a pg_ctl stop. I strongly suggest you review the _system_ logs for a possible hint as

Re: [GENERAL] Postgres SSL connection without client certificates.

2015-07-27 Thread Adrian Klaver
On 07/27/2015 12:48 AM, Amit Bondwal wrote: Hi Everyone. I am able to setup postgresql with TLS v1.2 with client certificate. I used below link to setup this and it works nicely. https://www.howtoforge.com/postgresql-ssl-certificates How can I connect to remote database with encrypted

Re: [GENERAL] I lost my password

2015-07-27 Thread Adrian Klaver
On 07/27/2015 06:22 AM, p...@arbolone.ca wrote: After removing PostgreSQL and manually deleting all the other files installed by it I reinstalled PostgreSQL, I started the cmd.exe and typed psql, asked me for the password, entered it, but to no avail. I took notes of all the information I

Re: [GENERAL] I lost my password

2015-07-27 Thread Raymond O'Donnell
On 27/07/2015 04:15, p...@arbolone.ca wrote: OK, I think I should tell you folks that I am a newbie. I am using postgresql to learn the SQL for the purpose of learning storing the data in my c++ application. I have near zero knowledge of SQL or PostgreSQL for that matter. When I type

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Adrian Klaver
On 07/27/2015 02:16 AM, Herouth Maoz wrote: Hello everybody. In the past week, it has happened to us twice already that we got an exception from our Java application, due to PostgreSQL terminating connection due to administrator command”. The problem is that I’m the administrator, and I issued

[GENERAL] This utility can only upgrade to PostgreSQL version 9.4

2015-07-27 Thread Furlong, Shane
I am trying to upgrade from PostgreSQL 9.0.22 to 9.4.4. When I attempt to execute pg_upgrade, I get the following error: Performing Consistency Checks - Checking cluster versions This utility can only upgrade to PostgreSQL version 9.4. The command I am executing is:

Re: [GENERAL] This utility can only upgrade to PostgreSQL version 9.4

2015-07-27 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Shane Furlong asks: When I attempt to execute pg_upgrade, I get the following error: ... This utility can only upgrade to PostgreSQL version 9.4. ... /app/PostgreSQL/9.4/bin/pg_upgrade -b /app/PostgreSQL/9.0/bin -B /app/PostgreSQL/9.4/bin

Re: [GENERAL] I lost my password

2015-07-27 Thread papa
It worked! Thanks kids, that was awesome! One last question, is there a tutorial about accessing the back end using c++ Again, thanks s much! -Original Message- From: Raymond O'Donnell Sent: Monday, July 27, 2015 9:28 AM To: p...@arbolone.ca ; Adrian Klaver ; PostGreSQL

Re: [GENERAL] This utility can only upgrade to PostgreSQL version 9.4

2015-07-27 Thread Adrian Klaver
On 07/27/2015 06:48 AM, Furlong, Shane wrote: I am trying to upgrade from PostgreSQL 9.0.22 to 9.4.4. When I attempt to execute pg_upgrade, I get the following error: *Performing Consistency Checks* *-* *Checking cluster versions* *This utility can only upgrade

Re: [GENERAL] I lost my password

2015-07-27 Thread Raymond O'Donnell
On 27/07/2015 14:54, p...@arbolone.ca wrote: It worked! Thanks kids, that was awesome! Glad it worked. It's a while since I've been called a kid! :-) One last question, is there a tutorial about accessing the back end using c++ I've done it using Qt, and there are tons of documentation and

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Herouth Maoz
On 27 ביולי 2015, at 16:39, Adrian Klaver adrian.kla...@aklaver.com wrote: * Given that I did not terminate any backend connection interactively, why did I get a terminating connection due to administrator command” message? Is there any situation where this message is issued

Re: [GENERAL] Splitting a string containing a numeric value in to three parts

2015-07-27 Thread Kevin Grittner
Sanjaya Vithanagama svithanag...@gmail.com wrote: I can match the numeric value and the rest of the string after the numeric value using the following: select regexp_matches('hello+123123.453the-123re', '([\+|-]?(?:\d*(?:(?:\.)?\d+)))(.*)')

Re: [GENERAL] Delete rule does not prevent truncate

2015-07-27 Thread Tim Smith
Just in case it has not been made obvious yet, rules are silently deprecated. They still exist because views depend on them, but it is generally considered best practices to not use them outside that realm. Well, the manual doesn't seem to reflect that fact. If that's how the developers

Re: [GENERAL] Using the database to validate data

2015-07-27 Thread JPLapham
Zdeněk Bělehrádek wrote What about creating a SAVEPOINT before each INSERT, and if the INSERT returns an error, then ROLLBACK TO SAVEPOINT? This way you will have all the insertable data in your table, and you can still ROLLBACK the whole transaction, or COMMIT it if there were no errors.

[GENERAL] BDR Error on Debian wheezy packages

2015-07-27 Thread Alejandro Taboada
2015-07-24 14:25:52 UTC [4736-17] LOG: starting background worker process bdr (6174890623557546797,1,20737,)-bdr (6174890623557546797,1, Anyone know how can I solve this error? I'm using BDR replication with Debian wheezy packages. Thanks! 2015-07-24 14:25:52 UTC [4805-1] ERROR: tuple natts

Re: [GENERAL] Delete rule does not prevent truncate

2015-07-27 Thread Tim Smith
On 23 July 2015 at 19:25, Scott Marlowe scott.marl...@gmail.com wrote: stick to triggers, they're faster Erm, not according to your beloved manual !!! 38.7. Rules Versus Triggers a rule issuing one extra command is likely to be faster than a trigger The summary is, rules will only be

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Herouth Maoz
On 27 ביולי 2015, at 18:01, Adrian Klaver adrian.kla...@aklaver.com wrote: Not sure what yo have set up for logging, but you might to crank it up. 13 days between entries for a system that is in use all the time seems sort of light to me. Most of the log settings are just the Debian

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Adrian Klaver
On 07/27/2015 07:45 AM, Herouth Maoz wrote: On 27 ביולי 2015, at 16:39, Adrian Klaver adrian.kla...@aklaver.com wrote: * Given that I did not terminate any backend connection interactively, why did I get a terminating connection due to administrator command” message? Is there any

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Tom Lane
Herouth Maoz hero...@unicell.co.il writes: So I’m left with the question of what caused the shutdown on July 21st. Well, you had 2015-07-21 15:37:59 IDT LOG: received fast shutdown request There is exactly one place in the Postgres code that prints that message, and it is the postmaster's

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Herouth Maoz
On 27 ביולי 2015, at 16:55, Melvin Davidson melvin6...@gmail.com wrote: If you are running Linux (please ALWAYS give the O/S ), then this could have been caused by the sys admin doing a system shutdown. Yes, sorry about that, as I previously answered Adrian Klaver, the OS is Debian

Re: [GENERAL] Using the database to validate data

2015-07-27 Thread JPLapham
林士博 wrote If I am following correctly, you can do it in your application as follows. 1.begin transaction 2.insert each data. Catch db exception, and save exception message and other information you need to array. 3.in the end ,you can get all the information about the wrong data in array if

Re: [GENERAL] Delete rule does not prevent truncate

2015-07-27 Thread Melvin Davidson
For crying out loud GET OVER IT! You've been given a very reasonable and quick solution to your problem. You can either 1. Keep crying and moaning until someone changes the rules. 2. Give up and port to another database. 3. Write the triggers and solve your problem! On Fri, Jul 24, 2015 at 5:27

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Adrian Klaver
On 07/27/2015 08:42 AM, Herouth Maoz wrote: On 27 ביולי 2015, at 18:01, Adrian Klaver adrian.kla...@aklaver.com wrote: Not sure what yo have set up for logging, but you might to crank it up. 13 days between entries for a system that is in use all the time seems sort of light to me. Most of

Re: [GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Adrian Klaver
On 07/27/2015 08:07 AM, Herouth Maoz wrote: On 27 ביולי 2015, at 16:55, Melvin Davidson melvin6...@gmail.com wrote: If you are running Linux (please ALWAYS give the O/S ), then this could have been caused by the sys admin doing a system shutdown. Yes, sorry about that, as I previously

Re: [GENERAL] pgbench tps drop from 5000 to 37 going from localhost to a server 13ms away

2015-07-27 Thread Jeff Janes
On Mon, Jul 27, 2015 at 3:19 AM, Chris Withers ch...@simplistix.co.uk wrote: On 24/07/2015 22:51, Jeff Janes wrote: starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 This is your problem. There is only one row in the pgbench_branch table, and every

Re: [GENERAL] pg_dump error

2015-07-27 Thread AI Rumman
I am not using any comma here. With the same command I am able to take dump on other disks. But with ISOLON CIFS, I am getting the error. Thanks. On Mon, Jul 27, 2015 at 10:56 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 07/27/2015 10:55 AM, AI Rumman wrote: No it is -s for schema

[GENERAL] pg_dump error

2015-07-27 Thread AI Rumman
Hi, I am getting the following error during pg_dump: pg_dump dbname -v -t tablename -s -Fc -f dbname_tablename,sqlc pg_dump: [custom archiver] WARNING: ftell mismatch with expected position -- ftell used I am using Postgresql 9.1 and I have enough disk space on it. The backup drive is on

Re: [GENERAL] Using the database to validate data

2015-07-27 Thread Adam Brusselback
A little late to the party, but i'll share how I do my data imports / validation for anyone interested. I have a bunch of data that comes in from various sources, and it isn't always guaranteed to be in the correct format, have the right foreign keys, or even the right data types. I have a

Re: [GENERAL] pg_dump error

2015-07-27 Thread Adrian Klaver
On 07/27/2015 10:58 AM, AI Rumman wrote: I am not using any comma here. With the same command I am able to take dump on other disks. I beg to differ, From your original post: -f dbname_tablename,sqlc ^^^ But with ISOLON CIFS, I am getting the error. Thanks. On

Re: [GENERAL] Creating a user for pg_start_backup

2015-07-27 Thread Stephen Frost
* Michael Paquier (michael.paqu...@gmail.com) wrote: On Tue, Jul 21, 2015 at 4:47 PM, Andrew Beverley a...@andybev.com wrote: Dear all, I'm setting up hot backups on my database server. As such, I'd like to set up a Postgres user that has access to only pg_start_backup and

Re: [GENERAL] pg_dump error

2015-07-27 Thread Adrian Klaver
On 07/27/2015 10:48 AM, AI Rumman wrote: Hi, I am getting the following error during pg_dump: pg_dump dbname -v -t tablename -s -Fc -f dbname_tablename,sqlc ^ Is that really a ','(comma)? pg_dump: [custom archiver] WARNING: ftell

Re: [GENERAL] pg_dump error

2015-07-27 Thread AI Rumman
No it is -s for schema only backup. Thanks. On Mon, Jul 27, 2015 at 10:53 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 07/27/2015 10:48 AM, AI Rumman wrote: Hi, I am getting the following error during pg_dump: pg_dump dbname -v -t tablename -s -Fc -f dbname_tablename,sqlc

Re: [GENERAL] pg_dump error

2015-07-27 Thread Adrian Klaver
On 07/27/2015 10:55 AM, AI Rumman wrote: No it is -s for schema only backup. My ^ got misplaced in sending. I was talking about the ',' in the file name at the end of the command. Thanks. On Mon, Jul 27, 2015 at 10:53 AM, Adrian Klaver adrian.kla...@aklaver.com

Re: [GENERAL] Sorting CSV string and removing Duplicates

2015-07-27 Thread Yves Dorfsman
I have a csv string in a text field that is unsorted and contains duplicates. Is there a simple way to remove these and sort the string. E.g 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27 Do you need to eventually load the data in Postgres? I'd personally use python to deal with this,

Re: [GENERAL] Sorting CSV string and removing Duplicates

2015-07-27 Thread dinesh kumar
On Mon, Jul 27, 2015 at 12:57 PM, dinesh kumar dineshkuma...@gmail.com wrote: On Mon, Jul 27, 2015 at 12:53 PM, Alex Magnum magnum11...@gmail.com wrote: Hello, I have a csv string in a text field that is unsorted and contains duplicates. Is there a simple way to remove these and sort the

[GENERAL] Problems with timezone

2015-07-27 Thread JotaComm
​Hello, I have the following inconsistency in my environment: postgres@postgres =# SELECT current_timestamp; now --- *2015-07-27 16:26:40.001694-03* (1 row) postgres@postgres =# SHOW timezone; TimeZone - Brazil/East (1 row)

Re: [GENERAL] Problems with timezone

2015-07-27 Thread Adrian Klaver
On 07/27/2015 12:36 PM, JotaComm wrote: ​Hello, I have the following inconsistency in my environment: postgres@postgres =# SELECT current_timestamp; now --- *2015-07-27 16:26:40.001694-03* (1 row) postgres@postgres =# SHOW timezone; TimeZone

Re: [GENERAL] Sorting CSV string and removing Duplicates

2015-07-27 Thread Chris Mair
Hello, I have a csv string in a text field that is unsorted and contains duplicates. Is there a simple way to remove these and sort the string. E.g 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27 i tried string to array and unique but that did not work... Any suggestions on how to do

Re: [GENERAL] Sorting CSV string and removing Duplicates

2015-07-27 Thread dinesh kumar
On Mon, Jul 27, 2015 at 12:53 PM, Alex Magnum magnum11...@gmail.com wrote: Hello, I have a csv string in a text field that is unsorted and contains duplicates. Is there a simple way to remove these and sort the string. E.g 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27 i tried string to

[GENERAL] Sorting CSV string and removing Duplicates

2015-07-27 Thread Alex Magnum
Hello, I have a csv string in a text field that is unsorted and contains duplicates. Is there a simple way to remove these and sort the string. E.g 2,18,20,23,1,27,1,2,8,16,17,18,20,22,23,27 i tried string to array and unique but that did not work... Any suggestions on how to do this without

Re: [GENERAL] Lots of stuck queries after upgrade to 9.4

2015-07-27 Thread Heikki Linnakangas
On 07/23/2015 02:36 PM, Heikki Linnakangas wrote: On 07/23/2015 11:31 AM, Spiros Ioannou wrote: Well, so far with commit_delay=0 no problems. I will report back of couse if something happens, but I believe that the problem may indeed be solved/masked with that setting. Rough description of our

Re: [GENERAL] Splitting a string containing a numeric value in to three parts

2015-07-27 Thread Sanjaya Vithanagama
Thank you Kevin! I missed the start of string and end of string matching. On Tue, Jul 28, 2015 at 1:06 AM, Kevin Grittner kgri...@ymail.com wrote: Sanjaya Vithanagama svithanag...@gmail.com wrote: I can match the numeric value and the rest of the string after the numeric value using the

Re: [GENERAL] pgbench tps drop from 5000 to 37 going from localhost to a server 13ms away

2015-07-27 Thread Chris Withers
On 24/07/2015 22:51, Jeff Janes wrote: starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 This is your problem. There is only one row in the pgbench_branch table, and every transaction has to update that one row. This is inherently a seriaized event.

Re: [GENERAL] Sorting CSV string and removing Duplicates

2015-07-27 Thread Alex Magnum
Hi Danish, yes thats the one I was looking for. Thanks a lot!!! On Tue, Jul 28, 2015 at 1:32 AM, dinesh kumar dineshkuma...@gmail.com wrote: On Mon, Jul 27, 2015 at 12:57 PM, dinesh kumar dineshkuma...@gmail.com wrote: On Mon, Jul 27, 2015 at 12:53 PM, Alex Magnum magnum11...@gmail.com

Re: [GENERAL] Using the database to validate data

2015-07-27 Thread 林士博
No, when you catch an insert exception , you can save the information you needed to array or something likes that, and continue to do the next insert. In your application, you can write codes as follows. begin transaction loop try do insert catch exception save error info

Re: [GENERAL] Postgres SSL connection without client certificates.

2015-07-27 Thread Amit Bondwal
Thanks you very much Adrian for clearing my confusion. On Mon, Jul 27, 2015 at 7:24 PM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 07/27/2015 12:48 AM, Amit Bondwal wrote: Hi Everyone. I am able to setup postgresql with TLS v1.2 with client certificate. I used below link to setup

[GENERAL] Postgres SSL connection without client certificates.

2015-07-27 Thread Amit Bondwal
Hi Everyone. I am able to setup postgresql with TLS v1.2 with client certificate. I used below link to setup this and it works nicely. https://www.howtoforge.com/postgresql-ssl-certificates How can I connect to remote database with encrypted connection on tls without setting client certificates

[GENERAL] Connections closing due to terminating connection due to administrator command

2015-07-27 Thread Herouth Maoz
Hello everybody. In the past week, it has happened to us twice already that we got an exception from our Java application, due to PostgreSQL terminating connection due to administrator command”. The problem is that I’m the administrator, and I issued no such command. On the first opportunity