Re: [HACKERS] Allow interrupts on waiting standby

2017-03-29 Thread Michael Paquier
On Thu, Mar 30, 2017 at 1:52 PM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> > (2) standby.c >> > Do we need to specify WL_LATCH_SET? Who can set the latch? Do the >> backends who ended the conflict set the latch? >> >> This makes the process able to react on SIGHUP.

Re: [HACKERS] [WIP] RE: DECLARE STATEMENT setting up a connection in ECPG

2017-03-29 Thread Haribabu Kommi
On Thu, Mar 30, 2017 at 1:57 PM, Ideriha, Takeshi < ideriha.take...@jp.fujitsu.com> wrote: > > >+ if(connection_name == NULL) > >+ { > >+ /* > >+ * Going to here means not using AT clause in the DECLARE STATEMENT > >+ * We don't allocate a node to store the declared name because the > >+ * DECLARE

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Kyotaro HORIGUCHI
Hello, At Thu, 30 Mar 2017 15:59:14 +1100, Venkata B Nagothi wrote in > Yes, downloaded from the email on Windows and copied across to Linux and > did "git apply". The same works for me. But --keep-cr gave me the same result with you. > $ git am --keep-cr > ~/work/patches/0001-Fix-a-bug-of-p

[HACKERS] Somebody has not thought through subscription locking considerations

2017-03-29 Thread Tom Lane
I noticed this failure report: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dangomushi&dt=2017-03-29%2019%3A45%3A27 in which we find *** /home/buildfarm/data/buildroot/HEAD/pgsql.build/src/test/regress/expected/updatable_views.out Thu Mar 30 04:45:43 2017 --- /home/buildfarm/d

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-03-29 Thread Ashutosh Bapat
On Tue, Mar 28, 2017 at 10:24 PM, Robert Haas wrote: > On Mon, Mar 27, 2017 at 8:36 AM, Ashutosh Bapat > wrote: >> I have gone through the patch, and it looks good to me. Here's the set >> of patches with this patch included. Fixed the testcase failures. >> Rebased the patchset on de4da168d57de81

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-29 Thread Vaishnavi Prabakaran
On Thu, Mar 30, 2017 at 12:08 PM, Michael Paquier wrote: > On Wed, Mar 29, 2017 at 12:40 PM, Vaishnavi Prabakaran > wrote: > > Michael Paquier wrote: > >>Could you as well update src/tools/msvc/vcregress.pl, aka the routine > >>modulescheck so as this new test is skipped. I am sure that nobody >

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Venkata B Nagothi
On Thu, Mar 30, 2017 at 3:51 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > At Thu, 30 Mar 2017 11:12:56 +1100, Venkata B Nagothi > wrote in gmail.com> > > On Thu, Mar 30, 2017 at 10:55 AM, Michael Paquier < > michael.paqu...@gmail.com > > > wrote: > > > > > On Thu, Mar 30, 20

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Kyotaro HORIGUCHI
At Thu, 30 Mar 2017 11:12:56 +1100, Venkata B Nagothi wrote in > On Thu, Mar 30, 2017 at 10:55 AM, Michael Paquier > wrote: > > > On Thu, Mar 30, 2017 at 8:49 AM, Venkata B Nagothi > > wrote: > > > On Tue, Mar 28, 2017 at 5:51 PM, Kyotaro HORIGUCHI > > > wrote: > > > I tried applying this pa

Re: [HACKERS] Allow interrupts on waiting standby

2017-03-29 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier > > By the way, doesn't this wait event belong to IPC wait event type, because > the process is waiting for other conflicting processes to terminate the > conflict conditions? Did yo

Re: [HACKERS] Guidelines for GSoC student proposals / Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-03-29 Thread Mengxing Liu
Thanks, I've updated the proposal. Just one issue: I agree that we can make skip list a general data structure. But can we use the fixed-level skip list as a Plan B? Or a quick attempt before the general data structure ? Because I am not familiar with shared memory structure and tricks used in

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-29 Thread Tom Lane
Fabien COELHO writes: >> New Patch v29: Now with less coverage! > Patch applies cleanly. Make check ok. Feature still works! I've been hacking on this for about two full days now, and have gotten it to a point where I think it's committable. Aside from cosmetic changes, I've made it behave reas

Re: [HACKERS] sequence data type

2017-03-29 Thread Vitaly Burovoy
On 3/29/17, Michael Paquier wrote: > On Thu, Mar 30, 2017 at 11:18 AM, Vitaly Burovoy > wrote: >> I think min_value and max_value should not be set to "1" or "-1" but >> to real min/max of the type by default. > > This is the default behavior for ages, since e8647c45 to be exact. So > you would c

Re: [HACKERS] PG_GETARG_GISTENTRY?

2017-03-29 Thread Tom Lane
Andres Freund writes: > we have a good number of '(GISTENTRY *) PG_GETARG_POINTER(n)' in our > code - looks a bit better & shorter to have PG_GETARG_GISTENTRY(n). Should be PG_GETARG_GISTENTRY_P to match existing conventions, otherwise +1 regards, tom lane -- Sent via

Re: [HACKERS] Logical decoding on standby

2017-03-29 Thread Craig Ringer
On 29 March 2017 at 23:13, Simon Riggs wrote: > On 29 March 2017 at 10:17, Craig Ringer wrote: >> On 29 March 2017 at 16:44, Craig Ringer wrote: >> >>> * Split oldestCatalogXmin tracking into separate patch >> >> Regarding this, Simon raised concerns about xlog volume here. >> >> It's pretty neg

Re: [HACKERS] sequence data type

2017-03-29 Thread Michael Paquier
On Thu, Mar 30, 2017 at 11:18 AM, Vitaly Burovoy wrote: > I think min_value and max_value should not be set to "1" or "-1" but > to real min/max of the type by default. This is the default behavior for ages, since e8647c45 to be exact. So you would change 20 years of history? -- Michael -- Se

Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!

2017-03-29 Thread Rafia Sabih
On Thu, Mar 30, 2017 at 12:30 AM, Robert Haas wrote: > I don't think the problem originates at the Merge Join, though, > because the commit says that at is fixing semi and anti-join estimates > - this is a plain inner join, so in theory it shouldn't change. > However, it's a bit hard for me to pi

Re: [HACKERS] [WIP] RE: DECLARE STATEMENT setting up a connection in ECPG

2017-03-29 Thread Ideriha, Takeshi
Thank you very much for thorough review and sorry for late replay. Attched is 002_declareStmt_ecpglib_v7.patch and I haven't revised doc patch yet. >002_declareStmt_ecpglib_v5.patch: >+ struct connection *f = NULL; >+ > ecpg_init_sqlca(sqlca); > for (con = all_connections; con;) > { >- struct

Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!

2017-03-29 Thread Robert Haas
On Wed, Mar 29, 2017 at 8:00 PM, Tomas Vondra wrote: > What is however strange is that changing max_parallel_workers_per_gather > affects row estimates *above* the Gather node. That seems a bit, um, > suspicious, no? See the parallel-estimates.log. Thanks for looking at this! Comparing the paral

Re: [HACKERS] sequence data type

2017-03-29 Thread Vitaly Burovoy
On 3/29/17, Peter Eisentraut wrote: > Over at > > is is being discussed that maybe the behavior when altering the sequence > type isn't so great, because it currently doesn't update the min/m

Re: [HACKERS] pg_stat_wal_write statistics view

2017-03-29 Thread Haribabu Kommi
On Wed, Mar 29, 2017 at 5:10 AM, Fujii Masao wrote: > On Tue, Mar 28, 2017 at 1:40 PM, Haribabu Kommi > wrote: > > > > > > Added stats collection for walsender, statrup and autovacuum processes. > > The background workers that call pgstat_report_stat() function will > > automatically > > include

[HACKERS] [PATCH] Add two-arg for of current_setting(NAME, FALLBACK)

2017-03-29 Thread David Christensen
The two-arg form of the current_setting() function will allow a fallback value to be returned instead of throwing an error when an unknown GUC is provided. This would come in most useful when using custom GUCs; e.g.: -- errors out if the 'foo.bar' setting is unset SELECT current_setting('foo.

Re: [HACKERS] sequence data type

2017-03-29 Thread Michael Paquier
On Thu, Mar 30, 2017 at 2:36 AM, Peter Eisentraut wrote: > Over at > > is is being discussed that maybe the behavior when altering the sequence > type isn't so great, because it currently doe

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-03-29 Thread Shinoda, Noriyoshi
Hello, I tried this feature using most recently snapshot. In case of added constraint PRIMARY KEY for partition table, INSERT ON CONFLICT DO NOTHING statement failed with segmentaion fault. If the primary key constraint was not created on the partition, this statement executed successfully. -

Re: [HACKERS] Page Scan Mode in Hash Index

2017-03-29 Thread Ashutosh Sharma
I think you should consider refactoring this so that it doesn't need >> to use goto. Maybe move the while (offnum <= maxoff) logic into a >> helper function and have it return itemIndex. If itemIndex == 0, you >> can call it again. >> > > okay, Added a helper function for _hash_readpage(). Please

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-03-29 Thread Michael Paquier
On Wed, Mar 29, 2017 at 12:40 PM, Vaishnavi Prabakaran wrote: > Michael Paquier wrote: >>Could you as well update src/tools/msvc/vcregress.pl, aka the routine >>modulescheck so as this new test is skipped. I am sure that nobody >>will scream if this test is not run on Windows, but the buildfarm wi

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-03-29 Thread Haribabu Kommi
On Wed, Mar 29, 2017 at 11:04 PM, Andreas Karlsson wrote: > On 03/29/2017 05:43 AM, Haribabu Kommi wrote: > > Updated patch attached. > > I get a test failure in the pg_upgrade tests, but I do not have time right > now to investigate. > > The failing test is "Restoring database schemas in the new

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Tatsuo Ishii
> On Thu, Mar 30, 2017 at 9:12 AM, Tatsuo Ishii wrote: >> Committers will not apply patches which has trailing whitespace >> issues. So the patch submitter needs to fix them anyway. > > I cannot comment on that point (committers are free to pick up things > the way they want), but just using git

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Michael Paquier
On Thu, Mar 30, 2017 at 9:12 AM, Tatsuo Ishii wrote: > Committers will not apply patches which has trailing whitespace > issues. So the patch submitter needs to fix them anyway. I cannot comment on that point (committers are free to pick up things the way they want), but just using git commands t

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Venkata B Nagothi
On Thu, Mar 30, 2017 at 10:55 AM, Michael Paquier wrote: > On Thu, Mar 30, 2017 at 8:49 AM, Venkata B Nagothi > wrote: > > On Tue, Mar 28, 2017 at 5:51 PM, Kyotaro HORIGUCHI > > wrote: > > I tried applying this patch to latest master, it is not getting applied > > > > [dba@buildhost postgresql]

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Tatsuo Ishii
> On Thu, Mar 30, 2017 at 8:49 AM, Venkata B Nagothi wrote: >> On Tue, Mar 28, 2017 at 5:51 PM, Kyotaro HORIGUCHI >> wrote: >> I tried applying this patch to latest master, it is not getting applied >> >> [dba@buildhost postgresql]$ git apply >> /data/postgresql-patches/9.5-ReplicationSlots-Bug-P

Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!

2017-03-29 Thread Tomas Vondra
On 03/30/2017 12:14 AM, Tomas Vondra wrote: I've only ran the queries on 10GB data set, but that should be enough. The plans are from current master - I'll rerun the script on an older release later today. So, an plans from an older release (9.4) are attached. What seems to matter is th

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Michael Paquier
On Thu, Mar 30, 2017 at 8:49 AM, Venkata B Nagothi wrote: > On Tue, Mar 28, 2017 at 5:51 PM, Kyotaro HORIGUCHI > wrote: > I tried applying this patch to latest master, it is not getting applied > > [dba@buildhost postgresql]$ git apply > /data/postgresql-patches/9.5-ReplicationSlots-Bug-Patch/000

Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

2017-03-29 Thread Venkata B Nagothi
Regards, Venkata B N Database Consultant On Tue, Mar 28, 2017 at 5:51 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > This conflicts with 6912acc (replication lag tracker) so just > rebased on a6f22e8. > I tried applying this patch to latest master, it is not getting applied

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-03-29 Thread Michael Paquier
On Thu, Mar 30, 2017 at 4:08 AM, Stephen Frost wrote: > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: >> Stephen Frost wrote: >> > * Dagfinn Ilmari Mannsåker (ilm...@ilmari.org) wrote: >> >> > > Non-verbose prove still lists each test script, it just doesn't list >> > > each individual test w

Re: [HACKERS] logical replication access control patches

2017-03-29 Thread Petr Jelinek
On 29/03/17 20:55, Alvaro Herrera wrote: > Peter Eisentraut wrote: >> On 3/15/17 21:54, Peter Eisentraut wrote: > >>> 0004 Add subscription apply worker privilege checks >>> 0005 Add CREATE SUBSCRIPTION privilege on databases >> >> It would be nice to reach a conclusion on these (the second one >>

Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!

2017-03-29 Thread Tomas Vondra
On 03/29/2017 09:00 PM, Robert Haas wrote: On Mon, Mar 6, 2017 at 1:22 AM, Rafia Sabih wrote: This is to bring to notice a peculiar instance I found recently while running TPC-H benchmark queries. Q20 of the benchmark took 19 hours to complete ... That's bad. It is clear that selectivity

Re: [HACKERS] Page Scan Mode in Hash Index

2017-03-29 Thread Jesper Pedersen
Hi, On 03/27/2017 09:34 AM, Ashutosh Sharma wrote: Hi, I think you should consider refactoring this so that it doesn't need to use goto. Maybe move the while (offnum <= maxoff) logic into a helper function and have it return itemIndex. If itemIndex == 0, you can call it again. okay, Added

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-29 Thread Fabien COELHO
New Patch v29: Now with less coverage! Patch applies cleanly. Make check ok. Feature still works! -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Monitoring roles patch

2017-03-29 Thread Dave Page
On Wed, Mar 29, 2017 at 2:51 PM, Stephen Frost wrote: > > Dave's currently hacking on a new patch based on our discussion, so I'd > suggest waiting another hour or so anyway until he's done. > > Might be a bit longer as he's trying to do it in a hallway at > PGConf.US... Thanks Stephen. Here's a

Re: [HACKERS] [PATCH] SortSupport for macaddr type

2017-03-29 Thread Teodor Sigaev
Thank you, pushed Excellent! I've attached a new (and hopefully final) version of the patch. -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers mailing list (pgsql-

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-29 Thread Dmitry Dolgov
> On 29 March 2017 at 18:28, Andrew Dunstan wrote: > > These patches seem fundamentally OK. But I'm still not happy with the > naming etc. I've changed names for all functions and action definitions, moved out the changes in header file to `jsonapi.h` and removed `is_jsonb_data` macro. So it shou

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-29 Thread Michael Banck
Hi, I had a look at this. On Mon, Mar 13, 2017 at 03:11:50AM +0100, Andreas Karlsson wrote: > Spotted one of my TODO comments there so I have attached a patch where I > have cleaned up that function. I also fixed the the code to properly support > triggers. The patch applies with quite a few off

Re: [HACKERS] error handling in RegisterBackgroundWorker

2017-03-29 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, Mar 29, 2017 at 2:10 PM, Peter Eisentraut > wrote: > > How specifically would we do that? And what user would choose the > > behavior "start this background worker but don't worry if it doesn't work"? > > Well, if the background worker is auto-prewarm, you'd probably

Re: [HACKERS] Schedule and Release Management Team for PG10

2017-03-29 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, Mar 29, 2017 at 3:04 PM, Alvaro Herrera > wrote: > > I was rather surprised to see the March commitfest declared to exactly > > one month and feature freeze immediately thereafter. > > That's true, but at > https://wiki.postgresql.org/wiki/PgCon_2016_Developer_Meetin

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-29 Thread Corey Huinker
New Patch v29: Now with less coverage! (same as v28 minus the psql-on-error-stop.sql and associated changes) Fabien raises some good points about if/then being a tremendous tool for enhancing other existing regression tests. On Wed, Mar 29, 2017 at 2:16 PM, Fabien COELHO wrote: > > Hello Tom, >

Re: [HACKERS] Schedule and Release Management Team for PG10

2017-03-29 Thread Dave Page
On Wed, Mar 29, 2017 at 3:10 PM, Andres Freund wrote: > On 2017-03-29 16:04:50 -0300, Alvaro Herrera wrote: >> Tom Lane wrote: >> >> > My own thought is that there's room for at least a few days' slop in >> > the end date of the final commitfest, depending on what patches remain >> > open and what

[HACKERS] PG_GETARG_GISTENTRY?

2017-03-29 Thread Andres Freund
Hi, we have a good number of '(GISTENTRY *) PG_GETARG_POINTER(n)' in our code - looks a bit better & shorter to have PG_GETARG_GISTENTRY(n). Arugments against? Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] pg_dump truncating queries in error messages

2017-03-29 Thread Peter Eisentraut
On 3/26/17 16:09, Tom Lane wrote: > Peter Eisentraut writes: >> When reporting an error from a query, pg_dump truncates the reported >> query to 128 characters (pg_backup_db.c ExecuteSqlCommand()). > >> Is this (still) sensible? The kind of queries that pg_dump is running >> nowadays, I find mys

Re: [HACKERS] Schedule and Release Management Team for PG10

2017-03-29 Thread Andres Freund
On 2017-03-29 16:04:50 -0300, Alvaro Herrera wrote: > Tom Lane wrote: > > > My own thought is that there's room for at least a few days' slop in > > the end date of the final commitfest, depending on what patches remain > > open and what the prospects are for getting them done. (In the past > > we

Re: [HACKERS] Schedule and Release Management Team for PG10

2017-03-29 Thread Robert Haas
On Wed, Mar 29, 2017 at 3:04 PM, Alvaro Herrera wrote: > Tom Lane wrote: >> My own thought is that there's room for at least a few days' slop in >> the end date of the final commitfest, depending on what patches remain >> open and what the prospects are for getting them done. (In the past >> we'v

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-03-29 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Stephen Frost wrote: > > * Dagfinn Ilmari Mannsåker (ilm...@ilmari.org) wrote: > > > > Non-verbose prove still lists each test script, it just doesn't list > > > each individual test within the script. > > > > I agree that it'd be better to jus

Re: [HACKERS] error handling in RegisterBackgroundWorker

2017-03-29 Thread Robert Haas
On Wed, Mar 29, 2017 at 2:10 PM, Peter Eisentraut wrote: > How specifically would we do that? And what user would choose the > behavior "start this background worker but don't worry if it doesn't work"? Well, if the background worker is auto-prewarm, you'd probably rather have the database start

Re: [HACKERS] Schedule and Release Management Team for PG10

2017-03-29 Thread Alvaro Herrera
Tom Lane wrote: > My own thought is that there's room for at least a few days' slop in > the end date of the final commitfest, depending on what patches remain > open and what the prospects are for getting them done. (In the past > we've sometimes let the final fest stretch on indefinitely, which

Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!

2017-03-29 Thread Robert Haas
On Mon, Mar 6, 2017 at 1:22 AM, Rafia Sabih wrote: > This is to bring to notice a peculiar instance I found recently while > running TPC-H benchmark queries. Q20 of the benchmark took 19 hours to > complete ... That's bad. > It is clear that selectivity estimations are really bad in this case >

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-03-29 Thread Alvaro Herrera
Stephen Frost wrote: > * Dagfinn Ilmari Mannsåker (ilm...@ilmari.org) wrote: > > Non-verbose prove still lists each test script, it just doesn't list > > each individual test within the script. > > I agree that it'd be better to just show the per-script results rather > than every little test res

Re: [HACKERS] logical replication access control patches

2017-03-29 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 3/15/17 21:54, Peter Eisentraut wrote: > > 0004 Add subscription apply worker privilege checks > > 0005 Add CREATE SUBSCRIPTION privilege on databases > > It would be nice to reach a conclusion on these (the second one > particularly), because otherwise we'll be stuck

Re: [HACKERS] Monitoring roles patch

2017-03-29 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 3/28/17 12:19, Dave Page wrote: > > On Tue, Mar 28, 2017 at 11:39 AM, Peter Eisentraut > > wrote: > >> On 3/28/17 11:34, Dave Page wrote: > >>> On Tue, Mar 28, 2017 at 11:31 AM, Peter Eisentraut > >>> wrote: > This patch touch

Re: [HACKERS] Monitoring roles patch

2017-03-29 Thread Peter Eisentraut
On 3/28/17 12:19, Dave Page wrote: > On Tue, Mar 28, 2017 at 11:39 AM, Peter Eisentraut > wrote: >> On 3/28/17 11:34, Dave Page wrote: >>> On Tue, Mar 28, 2017 at 11:31 AM, Peter Eisentraut >>> wrote: This patch touches the pg_buffercache and pg_freespacemap extensions, but there appear

Re: [HACKERS] Schedule and Release Management Team for PG10

2017-03-29 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > My own thought is that there's room for at least a few days' slop in > the end date of the final commitfest, depending on what patches remain > open and what the prospects are for getting them done. (In the past > we've sometimes let the final fe

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-03-29 Thread Stephen Frost
* Dagfinn Ilmari Mannsåker (ilm...@ilmari.org) wrote: > Peter Eisentraut writes: > > > On 3/28/17 23:42, Michael Paquier wrote: > >> src/bin/pg_dump and src/test/modules/test_pgdump generate too much > >> output. If we could get tests to only print the final result, like how > >> many tests done

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-29 Thread Fabien COELHO
Hello Tom, If someone were to put together a TAP test suite that covered all that and made for a meaningful improvement in psql's altogether-miserable code coverage report[1], I would think that that would be a useful expenditure of buildfarm time. Ok, this is an interesting point. What I'm

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-29 Thread Jan Michálek
2017-03-27 19:41 GMT+02:00 Jan Michálek : > > > 2017-03-23 17:26 GMT+01:00 Pierre Ducroquet : > >> The following review has been posted through the commitfest application: >> make installcheck-world: tested, passed >> Implements feature: tested, passed >> Spec compliant: tested, p

Re: [HACKERS] error handling in RegisterBackgroundWorker

2017-03-29 Thread Peter Eisentraut
On 3/24/17 02:33, Michael Paquier wrote: > What if we just let the user choose what they want with a new switch > in bgw_flags, but keep LOG the default? One behavior and the other > look both sensible to me. How specifically would we do that? And what user would choose the behavior "start this b

Re: [HACKERS] logical replication access control patches

2017-03-29 Thread Peter Eisentraut
On 3/15/17 21:54, Peter Eisentraut wrote: > 0001 Refine rules for altering publication owner > 0002 Change logical replication pg_hba.conf use These two were committed. > 0003 Add USAGE privilege for publications I'm withdrawing this one for now, because of some issues that were discussed in the

Re: [HACKERS] [sqlsmith] Unpinning error in parallel worker

2017-03-29 Thread Andreas Seltenreich
Thomas Munro writes: > Based on feedback on another thread about how to make reviewers' and > committers' jobs easier, here is a format-patch version with a short > description as raw material for a commit message, in case that is > helpful. +1 It's quite convenient. Otherwise I have to be crea

Re: [HACKERS] sequence data type

2017-03-29 Thread Peter Eisentraut
Over at is is being discussed that maybe the behavior when altering the sequence type isn't so great, because it currently doesn't update the min/max values of the sequence at all. So here is

Re: [HACKERS] [PATCH] Generic type subscripting

2017-03-29 Thread Arthur Zakirov
On 28.03.2017 19:31, Dmitry Dolgov wrote: On 28 March 2017 at 12:08, Dmitry Dolgov <9erthali...@gmail.com > wrote: Wow, I didn't notice that, sorry - will fix it shortly. So, here is the corrected version of the patch. I have some picky comments. I'm not sure

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-29 Thread Alvaro Herrera
Pavan Deolasee wrote: > On Wed, Mar 29, 2017 at 3:42 AM, Alvaro Herrera > wrote: > > > I pushed 0002 after some makeup, since it's just cosmetic and not > > controversial. > > Thanks. I think your patch of tracking interesting attributes seems ok too > after the performance issue was addressed.

Re: [HACKERS] [PATCH] few fts functions for jsonb

2017-03-29 Thread Andrew Dunstan
On 26 March 2017 at 17:57, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> I'm not through looking at this. However, here are a few preliminary >> comments > > I've attached new versions of the patches with improvements related to these > commentaries. These patches seem fundamentally OK. But I'm

Re: [HACKERS] logical decoding of two-phase transactions

2017-03-29 Thread Stas Kelvich
> On 28 Mar 2017, at 18:08, Andres Freund wrote: > > On 2017-03-28 15:55:15 +0100, Simon Riggs wrote: >> >> >> That assertion is obviously false... the plugin can resolve this in >> various ways, if we allow it. > > Handling it by breaking replication isn't handling it (e.g. timeouts in > dec

Re: [HACKERS] Logical decoding on standby

2017-03-29 Thread Simon Riggs
On 29 March 2017 at 10:17, Craig Ringer wrote: > On 29 March 2017 at 16:44, Craig Ringer wrote: > >> * Split oldestCatalogXmin tracking into separate patch > > Regarding this, Simon raised concerns about xlog volume here. > > It's pretty negligible. > > We only write a new record when a vacuum ru

[HACKERS] Multiple TO version in ALTER EXTENSION UPDATE

2017-03-29 Thread Daniel Gustafsson
While reading I noticed that we allow multiple TO in ALTER EXTENSION UPDATE, and defer throwing a syntax error until command processing. Is there a reason for deferring and not handling it in gram.y directly as in the attached patch since it is in fact a syntax error? It yields a different error

Re: [HACKERS] PATCH: pageinspect / add page_checksum and bt_page_items(bytea)

2017-03-29 Thread Tomas Vondra
On 03/24/2017 04:27 AM, Peter Eisentraut wrote: On 3/17/17 18:35, Tomas Vondra wrote: On 03/17/2017 05:23 PM, Peter Eisentraut wrote: I'm struggling to find a good way to share code between bt_page_items(text, int4) and bt_page_items(bytea). If we do it via the SQL route, as I had suggested,

Re: [HACKERS] [COMMITTERS] pgsql: Improve access to parallel query from procedural languages.

2017-03-29 Thread Robert Haas
On Wed, Mar 29, 2017 at 12:02 AM, Rafia Sabih wrote: > On Tue, Mar 28, 2017 at 9:05 PM, Robert Haas wrote: >> OK, but don't pg_event_trigger_dropped_objects and >> pg_event_trigger_ddl_commands need the same treatment? >> > Done. > I was only concentrating on the build farm failure cases, otherwi

Re: [HACKERS] Monitoring roles patch

2017-03-29 Thread Stephen Frost
Dave, * Dave Page (dp...@pgadmin.org) wrote: > OK, so essentially what I did, except s/pg_read_all_stats/pg_read_all_queries > ? Yup. > So pgstattuple, pg_sfreespacemap, pg_visibility and pgrowlocks to be > allowed access from members of pg_stat_scan_tables, which in turn is > granted to pg_mon

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-29 Thread Robert Haas
On Wed, Mar 29, 2017 at 4:21 AM, Amit Langote wrote: > Looks correct, so incorporated in the attached updated patch. Thanks. This seems like a hacky way to limit the reloptions to just OIDs. Shouldn't we instead have a new RELOPT_KIND_PARTITIONED or something like that? -- Robert Haas Enterpri

Re: [HACKERS] [sqlsmith] Unpinning error in parallel worker

2017-03-29 Thread Robert Haas
On Wed, Mar 29, 2017 at 1:31 AM, Thomas Munro wrote: > I considered whether the error message could be improved but it > matches the message for an existing similar case (where you try to > attach to an unknown handle). Ugh, OK. I committed this, but I think this whole file needs a visit from th

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-03-29 Thread Dagfinn Ilmari Mannsåker
Peter Eisentraut writes: > On 3/28/17 23:42, Michael Paquier wrote: >> src/bin/pg_dump and src/test/modules/test_pgdump generate too much >> output. If we could get tests to only print the final result, like how >> many tests done and how many have passed, things would be much >> friendlier. > >

Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

2017-03-29 Thread Tom Lane
Fabien COELHO writes: >> If we're sufficiently dead set on it, we could go back to the TAP-based >> approach, > Hmmm. You rejected it. I agree that TAP tests are not well suited for some > simple tests because of their initdb overhead. >> but I still doubt that this test is worth the amount of

Re: [HACKERS] [PATCH] Reduce src/test/recovery verbosity

2017-03-29 Thread Peter Eisentraut
On 3/28/17 23:42, Michael Paquier wrote: > src/bin/pg_dump and src/test/modules/test_pgdump generate too much > output. If we could get tests to only print the final result, like how > many tests done and how many have passed, things would be much > friendlier. There are options to change the verb

Re: [HACKERS] Allow interrupts on waiting standby

2017-03-29 Thread Michael Paquier
On Wed, Mar 29, 2017 at 5:04 PM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier >> What do you think about the updated version attached? > I reviewed this patch. Here are some comments and questions

Re: [HACKERS] Logical replication existing data copy

2017-03-29 Thread Petr Jelinek
On 29/03/17 10:14, Erik Rijkers wrote: > On 2017-03-09 11:06, Erik Rijkers wrote: I use three different machines (2 desktop, 1 server) to test logical replication, and all three have now at least once failed to correctly synchronise a pgbench session (amidst many succesful runs,

Re: [HACKERS] Adding support for Default partition in partitioning

2017-03-29 Thread Rahila Syed
Thanks for reporting. I have identified the problem and have a fix. Currently working on allowing adding a partition after default partition if the default partition does not have any conflicting rows. Will update the patch with both of these. Thank you, Rahila Syed On Mon, Mar 27, 2017 at 12:10

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-03-29 Thread Andreas Karlsson
On 03/29/2017 05:43 AM, Haribabu Kommi wrote: > Updated patch attached. I get a test failure in the pg_upgrade tests, but I do not have time right now to investigate. The failing test is "Restoring database schemas in the new cluster". I get the following in the log: command: "/home/andreas

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-29 Thread Mithun Cy
Thanks, Amit for a detailed review. On Wed, Mar 29, 2017 at 4:09 PM, Amit Kapila wrote: > Okay, your current patch looks good to me apart from minor comments, > so marked as Read For Committer. Please either merge the > sort_hash_b_2.patch with main patch or submit it along with next > revision

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-29 Thread Mithun Cy
That means at every new +split point we double the existing number of buckets. Allocating huge chucks On Mon, Mar 27, 2017 at 11:56 PM, Jesper Pedersen wrote: > I ran some performance scenarios on the patch to see if the increased > 'spares' allocation had an impact. I havn't found any regressi

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-29 Thread Robert Haas
On Wed, Mar 29, 2017 at 7:12 AM, Amit Kapila wrote: > No as I agreed above, it won't double-compress, but still looks > slightly risky to rely on different set of values passed to > index_form_tuple and then compare them. It assumes that the compressor is completely deterministic, which I'm fairl

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-29 Thread Amit Kapila
On Wed, Mar 29, 2017 at 1:10 PM, Pavan Deolasee wrote: > > On Wed, Mar 29, 2017 at 12:02 PM, Amit Kapila > wrote: >> >> On Wed, Mar 29, 2017 at 11:52 AM, Amit Kapila >> wrote: > > Then during recheck, we pass already compressed values to > index_form_tuple(). But my point is, the following code

[HACKERS] Use American English spelling in pg_waldump error message

2017-03-29 Thread Daniel Gustafsson
We use “unrecognize” rather than “unrecognise” in all other error messages in the tree, the attached patch fixes the one place where the latter spelling was used. cheers ./daniel pg_waldump_errmsg.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.

Re: [HACKERS] gitlab post-mortem: pg_basebackup waiting for checkpoint

2017-03-29 Thread Michael Banck
Hi, Am Montag, den 27.02.2017, 16:20 +0100 schrieb Magnus Hagander: > On Sun, Feb 26, 2017 at 9:59 PM, Tom Lane wrote: > Is there an argument for back-patching this? > > > Seems you were typing that at the same time as we did. > > > I'm considering it, but not swayed in either directi

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-29 Thread Amit Kapila
On Wed, Mar 29, 2017 at 12:51 PM, Mithun Cy wrote: > On Wed, Mar 29, 2017 at 10:12 AM, Amit Kapila wrote: >> Few other comments: >> +/* >> + * This is just a trick to save a division operation. If you look into the >> + * bitmap of 0-based bucket_num 2nd and 3rd most significant bit will >> indi

Re: [HACKERS] Logical decoding on standby

2017-03-29 Thread Craig Ringer
On 29 March 2017 at 16:44, Craig Ringer wrote: > * Split oldestCatalogXmin tracking into separate patch Regarding this, Simon raised concerns about xlog volume here. It's pretty negligible. We only write a new record when a vacuum runs after catalog_xmin advances on the slot with the currently

Re: [HACKERS] Allow interrupts on waiting standby

2017-03-29 Thread Tsunakawa, Takayuki
(4) standby.c > The latch is not reset when the wait timed out. The next WaitLatch() would > return immediately. Sorry, let me withdraw this. This is my misunderstanding. OTOH, when is the latch reset before the wait? Is there an assumption that MyLatch has been in reset state since it was i

Re: [HACKERS] Logical decoding on standby

2017-03-29 Thread Craig Ringer
On 29 March 2017 at 08:11, Craig Ringer wrote: > On 29 March 2017 at 08:01, Craig Ringer wrote: > >> I just notice that I failed to remove the docs changes regarding >> dropping slots becoming db-specific, so I'll post a follow-up for that >> in a sec. > > Attached. ... and here's the next in th

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-29 Thread Kyotaro HORIGUCHI
At Wed, 29 Mar 2017 17:21:26 +0900, Amit Langote wrote in > > Thanks for taking a look. This patch is small enough to look at in a short time:p > > The following attracted my eyes. > > > > + if (def->defnamespace == NULL && > > + pg_strcasecmp(def->defname, "oids") != 0) > > +

Re: [HACKERS] ANALYZE command progress checker

2017-03-29 Thread vinayak
On 2017/03/25 4:30, Robert Haas wrote: On Fri, Mar 24, 2017 at 3:41 AM, vinayak wrote: I have updated the patch. You can't change the definition of AcquireSampleRowsFunc without updating the documentation in fdwhandler.sgml, but I think I don't immediately understand why that's a thing we wan

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-03-29 Thread Amit Langote
On 2017/03/29 0:39, Robert Haas wrote: > On Tue, Mar 28, 2017 at 6:50 AM, Amit Langote > wrote: >>> Isn't it bogus that this is generating ALTER TABLE .. SET NOT NULL >>> columns at all? You didn't say anything like that when setting up the >>> database, so why should it be there when dumping? >>

Re: [HACKERS] [patch] reorder tablespaces in basebackup tar stream for backup_label

2017-03-29 Thread Kyotaro HORIGUCHI
Hello, At Wed, 29 Mar 2017 09:23:42 +0200, Michael Banck wrote in <149077.18436.14.ca...@credativ.de> > Hi, > > Am Mittwoch, den 29.03.2017, 15:22 +0900 schrieb Michael Paquier: > > On Wed, Mar 29, 2017 at 3:56 AM, Fujii Masao wrote: > > > If your need other information except START WAL LO

Re: [HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...

2017-03-29 Thread Kang Yuzhe
Thanks Amit for further confirmation on the Craig's intention. I am looking forward to seeing your "PG internal machinery under microscope" blog. May health, persistence and courage be with YOU. Regards, Zeray On Wed, Mar 29, 2017 at 10:36 AM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-29 Thread Amit Langote
Horiguchi-san, Thanks for taking a look. On 2017/03/29 16:49, Kyotaro HORIGUCHI wrote: > At Wed, 29 Mar 2017 15:40:20 +0900, Amit Langote wrote: >> On 2017/03/27 23:27, Robert Haas wrote: And here is the updated patch. >>> >>> I think you should go back to the earlier strategy of disallowing

  1   2   >