Re: [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-09 Thread David G. Johnston
Adding -hackers for consideration in the Commitfest. Thanks! David J. >>>Original request by me http://www.postgresql.org/message-id/CAKFQuwZqjz-je3Z=8jdodym3jm-n2ul4cuqy5vh8n75e5v1...@mail.gmail.com When executing a query using \watch in psql the first execution of the query includes "Title

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-09 Thread David G. Johnston
On Wednesday, March 9, 2016, rob stone wrote: > On Wed, 2016-03-09 at 12:25 -0500, Adam Brusselback wrote: > > Note that:- (a) I included header_description in the definition. > (b) Removed some lines as if you want the total you may as well > include it in your select

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-09 Thread rob stone
On Wed, 2016-03-09 at 12:25 -0500, Adam Brusselback wrote: > I responded yesterday, but it seems to have gotten caught up because > it was too big with the attachments... Here it is again. > > Sorry about not posting correctly, hopefully I did it right this > time. > > So I wanted to see if Sql

[GENERAL] PostgreSQL crashed, whole PC not responding

2016-03-09 Thread Kiswono Prayogo
Hi, I'm upgrading to PostgreSQL 9.5.1 in 64-bit ArchLinux (Linux 4.4.1-2-ARCH) for around 4 days (previously we use 9.4.x), and the PostgreSQL crashed and make the whole PC down, with this last log from journalctl: Mar 09 23:31:17 asd kernel: BUG: Bad page state in process postgres pfn:d18515

Re: Email address VERP problems (was RE: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-09 Thread david
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Magnus Hagander Sent: Thursday, 10 March 2016 6:18 AM To: Alvaro Herrera Cc: David Bennett ; pgsql-general@postgresql.org Subject: Re: Email address

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread Adrian Klaver
On 03/09/2016 10:41 AM, fred...@huitfeldt.com wrote: Hi Adrian, thank you very much for your patience. I apologise for the missing information. On 9 March 2016 16:13:00 +01:00, Adrian Klaver wrote: On 03/09/2016 04:56 AM, fred...@huitfeldt.com

Re: [GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-09 Thread Kevin Grittner
On Wed, Mar 9, 2016 at 1:39 PM, Alexandru Lazarev wrote: Jeff's answer is entirely correct; I'm just going to go into more detail -- just in case you're interested enough to work through it. > `CREATE TABLE public.foo (id serial PRIMARY KEY, mynum integer);` > > and

Re: [GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-09 Thread Jeff Janes
On Wed, Mar 9, 2016 at 11:39 AM, Alexandru Lazarev wrote: > > Transaction 1 operated on set of data (`WHERE` clause) on which 2nd > transaction do an `INSERT`, which fit to clause from 1st transaction. > Shouldn't 1st transaction fail if 2nd commit first? > > I have

[GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-09 Thread Alexandru Lazarev
Transaction 1 operated on set of data (`WHERE` clause) on which 2nd transaction do an `INSERT`, which fit to clause from 1st transaction. Shouldn't 1st transaction fail if 2nd commit first? I have following table (in PostgreSQL 9.5 db) `CREATE TABLE public.foo (id serial PRIMARY KEY, mynum

Re: Email address VERP problems (was RE: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-09 Thread Magnus Hagander
On Wed, Mar 9, 2016 at 7:03 PM, Alvaro Herrera wrote: > David Bennett wrote: > > > ow...@postgresql.org] On Behalf Of Alvaro Herrera > > > > > On that subject. I noticed that Outlook seems to add the "return > > > path" > > > addresses (sometimes called bounce address

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread fredrik
Hi Adrian, thank you very much for your patience. I apologise for the missing information. On 9 March 2016 16:13:00 +01:00, Adrian Klaver wrote: > On 03/09/2016 04:56 AM, wrote: > > > Hi Adrian, > > > > thank you very much for your

Re: Email address VERP problems (was RE: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-09 Thread Alvaro Herrera
David Bennett wrote: > > ow...@postgresql.org] On Behalf Of Alvaro Herrera > > > On that subject. I noticed that Outlook seems to add the "return > > path" > > addresses (sometimes called bounce address or envelope sender) to the > > CC header, which sets a new record in the stupidity scale.

Email address VERP problems (was RE: [GENERAL] Does a call to a language handler provide a context/session, and somewhere to keep session data?

2016-03-09 Thread David Bennett
> ow...@postgresql.org] On Behalf Of Alvaro Herrera > On that subject. I noticed that Outlook seems to add the "return > path" > addresses (sometimes called bounce address or envelope sender) to the > CC header, which sets a new record in the stupidity scale. Since we > use VERP, each message

Re: [GENERAL] Windows default directory for client certificates

2016-03-09 Thread Lupi Loop
Thank you very much for your answer Laurenz, I was storing the client certificates in PGDATA (C:\Program Files\PostgreSQL\9.5\data\) instead of in APPDATA (C:\Users\XXX\AppData\Roaming). Problem solved. Thank you 2016-03-09 11:45 GMT+01:00 Albe Laurenz : > Lupi Loop

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-09 Thread Adam Brusselback
I responded yesterday, but it seems to have gotten caught up because it was too big with the attachments... Here it is again. Sorry about not posting correctly, hopefully I did it right this time. So I wanted to see if Sql Server (2014) could handle this type of query differently than Postgres

Re: [GENERAL] Streaming replication and slave-local temp tables

2016-03-09 Thread Pavel Stehule
Hi 2016-03-09 18:14 GMT+01:00 Ivan Voras : > Hello, > > Is it possible (or will it be possible) to issue CREATE TEMP TABLE > statements on the read-only slave nodes in master-slave streaming > replication in recent version of PostgreSQL (9.4+)? > Currently it is not possible.

[GENERAL] Streaming replication and slave-local temp tables

2016-03-09 Thread Ivan Voras
Hello, Is it possible (or will it be possible) to issue CREATE TEMP TABLE statements on the read-only slave nodes in master-slave streaming replication in recent version of PostgreSQL (9.4+)?

Re: [GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Chris Travers
On Wed, Mar 9, 2016 at 4:53 PM, Alexander Farber wrote: > Hello Chris, > > On Wed, Mar 9, 2016 at 4:42 PM, Chris Travers > wrote: > >> >> >> On Wed, Mar 9, 2016 at 1:10 PM, Alexander Farber < >> alexander.far...@gmail.com> wrote: >> >>> >>>

Re: [GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Alexander Farber
Hello Chris, On Wed, Mar 9, 2016 at 4:42 PM, Chris Travers wrote: > > > On Wed, Mar 9, 2016 at 1:10 PM, Alexander Farber < > alexander.far...@gmail.com> wrote: > >> >> what is please the most efficient way to delete a slice from the start of >> a longer array (after I

Re: [GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Chris Travers
On Wed, Mar 9, 2016 at 1:10 PM, Alexander Farber wrote: > Hello fellow PostgreSQL users, > > what is please the most efficient way to delete a slice from the start of > a longer array (after I have copied it to another array)? > > Do I really have to copy a large

Re: [GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Alexander Farber
Hello Mike, On Wed, Mar 9, 2016 at 2:42 PM, Mike Sofen wrote: > > Have you considered a normal (relational), non-array-based data model for this app (2 or 3 tables in a 1:M/M:M) instead of the single table model you’ve shown? That would then allow you to use normal sql

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread Adrian Klaver
On 03/09/2016 04:56 AM, fred...@huitfeldt.com wrote: Hi Adrian, thank you very much for your response. I ran the "VACUUM ANALYZE" command on the master node. Regarding log messages. Here is the contents of the log (excluding connections/disconnections): Assuming the below is from the

Re: [GENERAL] create create of database of a particular name

2016-03-09 Thread Adrian Klaver
On 03/09/2016 07:02 AM, Chris Withers wrote: On 09/03/2016 14:53, Adrian Klaver wrote: On 03/09/2016 05:49 AM, Chris Withers wrote: Hi All, Django, a popular python web framework, runs its unit tests by creating a 'test_'-prefixed database and then dropping it at the end of the test run.

Re: [GENERAL] create create of database of a particular name

2016-03-09 Thread Chris Withers
On 09/03/2016 14:53, Adrian Klaver wrote: On 03/09/2016 05:49 AM, Chris Withers wrote: Hi All, Django, a popular python web framework, runs its unit tests by creating a 'test_'-prefixed database and then dropping it at the end of the test run. FYI in Django 1.8+ you can prevent that:

Re: [GENERAL] create create of database of a particular name

2016-03-09 Thread Adrian Klaver
On 03/09/2016 05:49 AM, Chris Withers wrote: Hi All, Django, a popular python web framework, runs its unit tests by creating a 'test_'-prefixed database and then dropping it at the end of the test run. FYI in Django 1.8+ you can prevent that:

[GENERAL] How to setup Active Directory users in Postgres 9.3.11

2016-03-09 Thread Wyatt Sanford
Hi, I have recently been tasked with installing Postgres 9.3.11 on a Windows 2012 R2 server on Active Directory and restoring backups from a Linux server running Postgres 9.3.11. I have all of the databases restored to the windows server and now I need to set up access for users on Active

[GENERAL] create create of database of a particular name

2016-03-09 Thread Chris Withers
Hi All, Django, a popular python web framework, runs its unit tests by creating a 'test_'-prefixed database and then dropping it at the end of the test run. Is there any way I can grant a user in postgres the ability only to create a database of a particular name? cheers, Chris -- Sent

Re: [GENERAL] regarding table migration from sql to postgres with runmtk.sh

2016-03-09 Thread Raghavendra
On Wed, Mar 9, 2016 at 7:26 AM, Durgamahesh Manne wrote: > Hi sir > i got following erro when i ran runmtk.sh > > initially i placed the jtds driver related to sql in > /opt/postgresplus/edbmtk/lib > > ./runMTK.sh -sourcedbtype sqlserver -targetdbtype postgresql >

Re: [GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Mike Sofen
>>Alexander Farber wrote on Wednesday, March 09, 2016 4:11 AM Hello fellow PostgreSQL users, what is please the most efficient way to delete a slice from the start of a longer array (after I have copied it to another array)? Do I really have to copy a large slice of the array to itself,

Re: [GENERAL] regarding table migration from sql to postgres with runmtk.sh

2016-03-09 Thread Andrew Sullivan
On Wed, Mar 09, 2016 at 06:56:38PM +0530, Durgamahesh Manne wrote: > Hi sir > i got following erro when i ran runmtk.sh > > initially i placed the jtds driver related to sql in > /opt/postgresplus/edbmtk/lib Looks like you're using postgresplus, which is EnterpriseDB's fork. But … > Exception

[GENERAL] regarding table migration from sql to postgres with runmtk.sh

2016-03-09 Thread Durgamahesh Manne
Hi sir i got following erro when i ran runmtk.sh initially i placed the jtds driver related to sql in /opt/postgresplus/edbmtk/lib ./runMTK.sh -sourcedbtype sqlserver -targetdbtype postgresql feeds_morningstar_bond_sector Running EnterpriseDB Migration Toolkit (Build 48.0.2) ... Source database

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread fredrik
Hi Adrian, thank you very much for your response. I ran the "VACUUM ANALYZE" command on the master node. Regarding log messages. Here is the contents of the log (excluding connections/disconnections): 2016-02-22 02:30:08 GMT 24616 LOG: recovery has paused 2016-02-22 02:30:08 GMT 24616 HINT:

[GENERAL] How to delete few elements from array beginning?

2016-03-09 Thread Alexander Farber
Hello fellow PostgreSQL users, what is please the most efficient way to delete a slice from the start of a longer array (after I have copied it to another array)? Do I really have to copy a large slice of the array to itself, like in the last line here: pile_array := pile_array ||

Re: [GENERAL] Windows default directory for client certificates

2016-03-09 Thread Albe Laurenz
Lupi Loop wrote: > PostgreSQL documentation at > http://www.postgresql.org/docs/9.5/static/libpq-ssl.html > says that when a client certificate is requested by a server, a windows > client psql will use by > default the credentials located at %APPDATA%\postgresql\postgresql.crt and >

Re: [GENERAL] Script to check replication

2016-03-09 Thread Jehan-Guillaume de Rorthais
Le Fri, 4 Mar 2016 19:35:16 +, Ashish Chauhan a écrit : > Hi, > > We are running Streaming replication with Hot standby in our current > production. I do have below script to check replication status and > replication lag. Does anyone have script which runs every