Re: [HACKERS] WAL Re-Writes

2016-02-08 Thread Robert Haas
On Mon, Feb 8, 2016 at 12:08 AM, Amit Kapila wrote: > I think deciding it automatically without user require to configure it, > certainly has merits, but what about some cases where user can get > benefits by configuring themselves like the cases where we use > PG_O_DIRECT flag for WAL (with o_dir

Re: [HACKERS] Patch: fix lock contention for HASHHDR.mutex

2016-02-08 Thread Robert Haas
On Mon, Feb 8, 2016 at 5:39 AM, Aleksander Alekseev wrote: >> So: do we have clear evidence that we need 128 partitions here, or >> might, say, 16 work just fine? > > Yes, this number of partitions was chosen based on this benchmark (see > "spinlock array" column): > > http://www.postgresql.org/me

Re: [HACKERS] remove wal_level archive

2016-02-08 Thread David Steele
On 2/7/16 4:47 PM, Peter Eisentraut wrote: > On 1/26/16 10:56 AM, Simon Riggs wrote: >> Removing one of "archive" or "hot standby" will just cause confusion and >> breakage, so neither is a good choice for removal. >> >> What we should do is >> 1. Map "archive" and "hot_standby" to one level with

[HACKERS] process type escape for log_line_prefix

2016-02-08 Thread Andres Freund
Hi, Frequently when reading postgres logs to do some post mortem analysis I'm left wondering what process emitted an error/log message. After the fact it's often hard to know wether an error message was emitted by a user backend or by something internal, say the checkpointer or autovacuum. Loggin

Re: [HACKERS] [ADMIN] 9.5 new setting "cluster name" and logging

2016-02-08 Thread Andres Freund
Hi, (x-posting to -hackers, more relevant audience) On 2016-01-29 22:19:45 -0800, Evan Rempel wrote: > Now that there is a setting to give a cluster a "name", it would be nice to > have an escape sequence in the log_line_prefix setting that could reference > the cluster_name. I've argued[1][2] f

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-02-08 Thread Amit Kapila
On Mon, Feb 8, 2016 at 12:28 PM, Michael Paquier wrote: > > > >> /* > >> + * Fetch the progress position before taking any WAL insert lock. This > >> + * is normally an operation that does not take long, but leaving this > >> + * lookup out of the section taken an exclusive lo

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-02-08 Thread Shulgin, Oleksandr
On Mon, Jan 25, 2016 at 5:11 PM, Shulgin, Oleksandr < oleksandr.shul...@zalando.de> wrote: > > On Sat, Jan 23, 2016 at 11:22 AM, Tomas Vondra < tomas.von...@2ndquadrant.com> wrote: >> >> >> Overall, I think this is really about deciding when to cut-off the MCV, so that it does not grow needlessly l

Re: [HACKERS] proposal: schema PL session variables

2016-02-08 Thread Andrew Dunstan
On 02/08/2016 03:16 AM, Pavel Stehule wrote: Hi On Russian PgConf I had a talk with Oleg about missing features in PLpgSQL, that can complicates a migrations from Oracle to PostgreSQL. Currently I see only one blocker - missing protected session variables. PL/SQL has package variables with

Re: [HACKERS] proposal: schema PL session variables

2016-02-08 Thread Pavel Stehule
2016-02-08 13:53 GMT+01:00 Marko Tiikkaja : > On 08/02/16 13:41, Pavel Stehule wrote: > >> 2016-02-08 13:22 GMT+01:00 Marko Tiikkaja : >> >>> Personally I find that undesirable. I don't know what oracle does, but >>> variables being visible without schema-qualifying them can introduce >>> variabl

Re: [HACKERS] pgbench stats per script & other stuff

2016-02-08 Thread Michael Paquier
On Fri, Feb 5, 2016 at 12:53 AM, Fabien COELHO wrote: >> Something is wrong with patch d. I noticed two things, >> 1. the total_weight stuff can overflow, > > It can generate an error on overflow by checking the total_weight while it > is being computed. I've switched total_weight to int64 so it

Re: [HACKERS] proposal: schema PL session variables

2016-02-08 Thread Marko Tiikkaja
On 08/02/16 13:41, Pavel Stehule wrote: 2016-02-08 13:22 GMT+01:00 Marko Tiikkaja : Personally I find that undesirable. I don't know what oracle does, but variables being visible without schema-qualifying them can introduce variable conflicts in PL/PgSQL. I'd prefer if you could only refer to

Re: [HACKERS] proposal: make NOTIFY list de-duplication optional

2016-02-08 Thread Craig Ringer
On 8 February 2016 at 09:37, Filip RembiaƂkowski < filip.rembialkow...@gmail.com> wrote: > On Sun, Feb 7, 2016 at 4:37 PM, Vik Fearing wrote: > > >>> There is also no mention in the documentation about what happens if I > do: > >>> > >>> NOTIFY ALL chan, 'msg'; > >>> NOTIFY ALL chan, 'msg

Re: [HACKERS] postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

2016-02-08 Thread Robert Haas
On Mon, Feb 8, 2016 at 5:45 AM, Etsuro Fujita wrote: > Maybe my explanation was not correct, but I'm saying that the targertlist of > the above outer_plan should be set to the fdw_scan_tlist, to avoid > misbehavior. Yeah, I think you're right. So in this hunk: + if (foreignrel->reloptkind

Re: [HACKERS] proposal: schema PL session variables

2016-02-08 Thread Pavel Stehule
2016-02-08 13:22 GMT+01:00 Marko Tiikkaja : > On 08/02/16 13:17, Pavel Stehule wrote: > >> 2016-02-08 13:03 GMT+01:00 Marko Tiikkaja : >> >>> How does this function know which schema variables are visible? >>> >> >> function see all schema variables from same schema as function's schema >> > > Per

Re: [HACKERS] remove wal_level archive

2016-02-08 Thread Michael Paquier
On Mon, Feb 8, 2016 at 6:47 AM, Peter Eisentraut wrote: > On 1/26/16 10:56 AM, Simon Riggs wrote: >> Removing one of "archive" or "hot standby" will just cause confusion and >> breakage, so neither is a good choice for removal. >> >> What we should do is >> 1. Map "archive" and "hot_standby" to on

Re: [HACKERS] proposal: schema PL session variables

2016-02-08 Thread Marko Tiikkaja
On 08/02/16 13:17, Pavel Stehule wrote: 2016-02-08 13:03 GMT+01:00 Marko Tiikkaja : How does this function know which schema variables are visible? function see all schema variables from same schema as function's schema Personally I find that undesirable. I don't know what oracle does, but

Re: [HACKERS] proposal: schema PL session variables

2016-02-08 Thread Pavel Stehule
2016-02-08 13:03 GMT+01:00 Marko Tiikkaja : > On 08/02/16 09:16, Pavel Stehule wrote: > >> Usage >> = >> >> DROP SCHEMA IF EXISTS test_schema CASCADE; >> SET SCHEMA test_schema; >> >> CREATE SCHEMA VARIABLE local_counter AS int DEFAULT 0; >> >> CREATE OR REPLACE FUNCTION increment_counter() >>

Re: [HACKERS] proposal: schema PL session variables

2016-02-08 Thread Marko Tiikkaja
On 08/02/16 09:16, Pavel Stehule wrote: Usage = DROP SCHEMA IF EXISTS test_schema CASCADE; SET SCHEMA test_schema; CREATE SCHEMA VARIABLE local_counter AS int DEFAULT 0; CREATE OR REPLACE FUNCTION increment_counter() RETURNS void AS $$ BEGIN local_counter := local_counter + 1; END; $$ L

Re: [HACKERS] backpatch for REL9_4_STABLE of commit 40482e606733675eb9e5b2f7221186cf81352da1

2016-02-08 Thread Michael Meskes
On Mon, Feb 08, 2016 at 09:20:46AM +, Huong Dangminh wrote: > I think this fixed is also required for REL9_4_STABLE. > Please confirm the attached patch. Sure thing, no idea where that cherry-pick got lost. Thanks. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes d

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-02-08 Thread Michael Paquier
On Mon, Feb 8, 2016 at 6:18 PM, Andres Freund wrote: > On 2016-02-08 15:58:49 +0900, Michael Paquier wrote: >> On Sun, Feb 7, 2016 at 2:49 AM, Andres Freund wrote: >> /* >> + * XLogInsert >> + * >> + * A shorthand for XLogInsertExtended, to update the progress of WAL >> + * activity by default.

[HACKERS] Use %u to print user mapping's umid and userid

2016-02-08 Thread Etsuro Fujita
Here is a patch to use %u not %d to print umid and userid. Best regards, Etsuro Fujita *** a/contrib/postgres_fdw/connection.c --- b/contrib/postgres_fdw/connection.c *** *** 159,165 GetConnection(UserMapping *user, bool will_prep_stmt) entry->have_error = false; entry->co

Re: [HACKERS] postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

2016-02-08 Thread Etsuro Fujita
On 2016/02/05 17:50, Ashutosh Bapat wrote: Btw, IIUC, I think the patch fails to adjust the targetlist of the top plan created that way, to output the fdw_scan_tlist, as discussed in [1] (ie, I think the attached patch is needed, which is created on top of your patch pg_fdw_join_

Re: [HACKERS] Patch: fix lock contention for HASHHDR.mutex

2016-02-08 Thread Aleksander Alekseev
Hello, Robert. > So: do we have clear evidence that we need 128 partitions here, or > might, say, 16 work just fine? Yes, this number of partitions was chosen based on this benchmark (see "spinlock array" column): http://www.postgresql.org/message-id/20151229184851.1bb7d1bd@fujitsu In fact we c

Re: [HACKERS] backpatch for REL9_4_STABLE of commit 40482e606733675eb9e5b2f7221186cf81352da1

2016-02-08 Thread Andres Freund
On 2016-02-08 20:59:25 +1100, Haribabu Kommi wrote: > On Mon, Feb 8, 2016 at 8:20 PM, Huong Dangminh > wrote: > > Hi, > > > > I think this fixed is also required for REL9_4_STABLE. > > Please confirm the attached patch. > > Yes, this fix was missed for 9.4 stable branch during back patch > and it

Re: [HACKERS] backpatch for REL9_4_STABLE of commit 40482e606733675eb9e5b2f7221186cf81352da1

2016-02-08 Thread Haribabu Kommi
On Mon, Feb 8, 2016 at 8:20 PM, Huong Dangminh wrote: > Hi, > > I think this fixed is also required for REL9_4_STABLE. > Please confirm the attached patch. Yes, this fix was missed for 9.4 stable branch during back patch and it is available on all other supported branches. Regards, Hari Babu Fuj

Re: [HACKERS] Parallel Aggregate

2016-02-08 Thread Haribabu Kommi
On Mon, Feb 8, 2016 at 9:01 AM, Robert Haas wrote: > On Thu, Jan 21, 2016 at 11:25 PM, Haribabu Kommi > wrote: >> [ new patch ] > > This patch contains a number of irrelevant hunks that really ought not > to be here and make the patch harder to understand, like this: > > -

Re: [HACKERS] Make PG's "NOT NULL"s and attnotnull ("is_nullable") conform to SQL-2011

2016-02-08 Thread Vitaly Burovoy
On 2/7/16, Vitaly Burovoy wrote: > Hello, Hackers! > > TODO list has an entry "Move NOT NULL constraint information to > pg_constraint" with four links and without two with the newest > work[1][2]. > > I rebased the patch from [2] (in attachment). At least it applies > cleanly on top of c477e84fe2

Re: [HACKERS] Development with Eclipse - Wrong error messages in IDE

2016-02-08 Thread Peter Moser
On 05.02.2016 um 18:40 Jason Petersen wrote: On Feb 3, 2016, at 2:38 AM, Peter Moser wrote: Does anyone had similar problems? Do I have to configure Eclipse to understand the PG_RMGR macro or is there another possibility to teach Eclipse these macros? Hi, I just built 9.6 under Eclipse CD

[HACKERS] backpatch for REL9_4_STABLE of commit 40482e606733675eb9e5b2f7221186cf81352da1

2016-02-08 Thread Huong Dangminh
Hi, I think this fixed is also required for REL9_4_STABLE. Please confirm the attached patch. Thanks and best regards, Dang Minh Huong NEC Solution Innovators, Ltd. http://www.nec-solutioninnovators.co.jp/en/ ecpg.9.4.patch Description: ecpg.9.4.patch -- Sent via pgsql-hackers mailing list (

Re: [HACKERS] Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

2016-02-08 Thread Andres Freund
On 2016-02-08 15:58:49 +0900, Michael Paquier wrote: > On Sun, Feb 7, 2016 at 2:49 AM, Andres Freund wrote: > > On 2016-02-06 22:03:15 +0900, Michael Paquier wrote: > >> The patch attached will apply on master, on 9.5 there is one minor > >> conflict. For older versions we will need another rework

Re: [HACKERS] Performance degradation in commit ac1d794

2016-02-08 Thread Kyotaro HORIGUCHI
Hello, I am one who wants waiting on many sockets at once. At Thu, 14 Jan 2016 18:55:51 +0100, Andres Freund wrote in <20160114175551.gm10...@awork2.anarazel.de> > On 2016-01-14 18:14:21 +0100, Andres Freund wrote: > > On 2016-01-14 12:07:23 -0500, Robert Haas wrote: > > > > Do we want to provid

[HACKERS] proposal: schema PL session variables

2016-02-08 Thread Pavel Stehule
Hi On Russian PgConf I had a talk with Oleg about missing features in PLpgSQL, that can complicates a migrations from Oracle to PostgreSQL. Currently I see only one blocker - missing protected session variables. PL/SQL has package variables with possible only package scope and session life cycle.

<    1   2