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

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.

[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

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

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

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

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,

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

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

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

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

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] 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

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

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

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

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:

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,

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

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

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

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 >

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

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

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

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

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

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 > >

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

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] 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

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

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

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

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 >

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

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

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.

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

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 >

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

[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

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

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

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...

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 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

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

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] [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 >

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

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

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

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

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.

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

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().

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] 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

[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

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

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

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 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

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

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

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

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,

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

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 >> >>

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

[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=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 ---

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

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] [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 >> > >

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] 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

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

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

Re: [HACKERS] Prologue of set_append_rel_size() and partitioned tables

2017-03-29 Thread Ashutosh Bapat
On Wed, Mar 29, 2017 at 12:23 PM, Amit Langote wrote: > On 2017/03/29 15:20, Ashutosh Bapat wrote: >> The prologue of set_append_rel_size() mentions >> >> * Note that in the inheritance case, >> * the first member relation is actually the same table as is

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

2017-03-29 Thread Kang Yuzhe
Thanks you all for pointing me to useful docs on PG kernel stuff as well as for being sympathetic with me and the newbie question that appears to be true and interesting but yet be addressed by PG experts. Last but not least, *Craig Ringer*, you just nailed it!! You also made me feel and think

Re: [HACKERS] Logical replication existing data copy

2017-03-29 Thread Erik Rijkers
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, of course) (At the moment using tese patches for

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

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

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

2017-03-29 Thread Mithun Cy
On Wed, Mar 29, 2017 at 10:12 AM, Amit Kapila wrote: >> I wonder if we should consider increasing >> SPLITPOINT_GROUPS_WITH_ONLY_ONE_PHASE somewhat. For example, split >> point 4 is responsible for allocating only 16 new buckets = 128kB; >> doing those in four groups of

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

2017-03-29 Thread Amit Langote
On 2017/03/29 12:36, Craig Ringer wrote: > On 29 March 2017 at 10:53, Amit Langote wrote: >> Hi, >> >> On 2017/03/28 15:40, Kang Yuzhe wrote: >>> Thanks Tsunakawa for such an informative reply. >>> >>> Almost all of the docs related to the internals of PG are of

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-29 Thread Kyotaro HORIGUCHI
Hello, At Wed, 29 Mar 2017 15:40:20 +0900, Amit Langote wrote in > On 2017/03/27 23:27, Robert Haas wrote: > > On Thu, Mar 23, 2017 at 8:54 PM, Amit Langote > > wrote: > >> On

Re: [HACKERS] Allow interrupts on waiting standby

2017-03-29 Thread Tsunakawa, Takayuki
Hi, Michael, 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: (1) monitoring.sgml The new row needs to be

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: > > >

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

2017-03-29 Thread Michael Banck
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 LOCATION at the beginning of > > base backup and they are very useful for many third-party

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

2017-03-29 Thread Pavan Deolasee
On Wed, Mar 29, 2017 at 12:02 PM, Amit Kapila wrote: > On Wed, Mar 29, 2017 at 11:52 AM, Amit Kapila > wrote: > > On Tue, Mar 28, 2017 at 10:35 PM, Pavan Deolasee > > wrote: > >> > >> On Tue, Mar 28, 2017 at 7:04 PM,

[HACKERS] [PATCH] Remove trailing spaces

2017-03-29 Thread Alexander Law
Hello, Please consider committing the attached patches to remove trailing spaces in strings in the source code. One patch is for localizable messages, and the other is just for consistency (less important). -- Alexander Lakhin Postgres Professional: http://www.postgrespro.com The Russian

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>

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

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

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

[HACKERS] Prologue of set_append_rel_size() and partitioned tables

2017-03-29 Thread Ashutosh Bapat
The prologue of set_append_rel_size() mentions * Note that in the inheritance case, * the first member relation is actually the same table as is mentioned in * the parent RTE ... but it has a different RTE and RelOptInfo. This isn't true about partitioned tables anymore. We do not

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

2017-03-29 Thread Michael Paquier
On Wed, Mar 29, 2017 at 3:56 AM, Fujii Masao wrote: > If your need other information except START WAL LOCATION at the beginning of > base backup and they are very useful for many third-party softwares, > you can add them into that first result set. If you do this, you can >

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

2017-03-29 Thread Amit Kapila
On Wed, Mar 29, 2017 at 11:52 AM, Amit Kapila wrote: > On Tue, Mar 28, 2017 at 10:35 PM, Pavan Deolasee > wrote: >> >> On Tue, Mar 28, 2017 at 7:04 PM, Amit Kapila >> wrote: >>> >>> For such an heap insert, we will

  1   2   >