Re: [HACKERS] Partitioned tables and relfilenode

2017-03-30 Thread Kyotaro HORIGUCHI
At Thu, 30 Mar 2017 20:58:35 +0900, Amit Langote wrote in > Thanks for the review. > > On Thu, Mar 30, 2017 at 7:37 PM, Kyotaro HORIGUCHI wrote: > > At Thu, 30 Mar 2017 18:24:16 +0900, Amit Langote wrote: > >> On 2017/03/29 23:58, Robert Haas wrote: > >> > On Wed, Mar 29, 2017 at 4:21 AM, Amit

Re: [HACKERS] Allow interrupts on waiting standby

2017-03-30 Thread Michael Paquier
On Thu, Mar 30, 2017 at 4:02 PM, Tsunakawa, Takayuki wrote: > I think you can call HandleStartupProcInterrupts() here, instead of checking > postmaster death. Oops, sorry for that, I quite mess up with this patch. The WaitLatch() call should still have WL_POSTMASTER_DEATH so as it can leave earl

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-30 Thread Michael Paquier
On Thu, Mar 30, 2017 at 5:13 AM, Michael Banck wrote: > 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. > > I h

Re: [HACKERS] Somebody has not thought through subscription locking considerations

2017-03-30 Thread Masahiko Sawada
On Fri, Mar 31, 2017 at 9:53 AM, Petr Jelinek wrote: > On 30/03/17 07:25, Tom Lane wrote: >> 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/pg

Re: [HACKERS] [PATCH] Generic type subscripting

2017-03-30 Thread Arthur Zakirov
2017-03-31 5:32 GMT+03:00 Dmitry Dolgov <9erthali...@gmail.com>: > On 30 March 2017 at 19:36, Arthur Zakirov wrote: >> >> The last point is about the tutorial. As Tom pointed it is not useful when >> the tutorial doesn't execute. It happens because there is not "custom" type >> in subscripting.sql

Re: [HACKERS] increasing the default WAL segment size

2017-03-30 Thread Beena Emerson
Hello, On Fri, Mar 31, 2017 at 11:20 AM, Kuntal Ghosh wrote: > On Fri, Mar 31, 2017 at 10:40 AM, Beena Emerson > wrote: > > On 30 Mar 2017 15:10, "Kuntal Ghosh" wrote: > > > I do not think a generalised function is a good idea. Besides, I feel the > > respective approaches are best kept in the

Re: [HACKERS] increasing the default WAL segment size

2017-03-30 Thread Kuntal Ghosh
On Fri, Mar 31, 2017 at 10:40 AM, Beena Emerson wrote: > On 30 Mar 2017 15:10, "Kuntal Ghosh" wrote: >> 03-modify-tools.patch - Makes XLogSegSize into a variable, currently set >> as >> XLOG_SEG_SIZE and modifies the tools to fetch the size instead of using >> inbuilt value. > Several methods ar

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-30 Thread Michael Paquier
On Mon, Mar 13, 2017 at 11:11 AM, Andreas Karlsson wrote: > On 03/02/2017 03:10 AM, Michael Paquier wrote: >> There is a lot of mumbo-jumbo in the patch to create the exact same >> index definition as the original one being reindexed, and that's a >> huge maintenance burden for the future. You can

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Craig Ringer
On 31 March 2017 at 12:49, Craig Ringer wrote: > On 31 March 2017 at 01:16, Andres Freund wrote: >> The comment and code don't quite square to me - it's far from obvious >> that LogStandbySnapshot does something like that. I'd even say it's a >> bad idea to have it do that. > > So you prefer the

Re: [HACKERS] New CORRESPONDING clause design

2017-03-30 Thread Pavel Stehule
Hi 2017-03-30 21:55 GMT+02:00 Pavel Stehule : > > > 2017-03-30 21:43 GMT+02:00 Tom Lane : > >> Pavel Stehule writes: >> > Is following use case defined in standard? >> >> > postgres=# SELECT 0 AS x1, 1 AS a, 0 AS x2, 2 AS b, 0 AS x3, -1 AS x3 >> >UNION ALL CORRESPONDING BY(a,b) SELEC

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

2017-03-30 Thread Jan Michálek
2017-03-30 21:53 GMT+02:00 Pavel Stehule : > > > 2017-03-29 20:11 GMT+02:00 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 i

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

2017-03-30 Thread Mithun Cy
Thanks, I have tried to fix all of the comments. On Fri, Mar 31, 2017 at 8:10 AM, Robert Haas wrote: > On Thu, Mar 30, 2017 at 2:36 PM, Mithun Cy wrote: >> Thanks Robert, I have tried to fix the comments given as below. > > Thanks. > > Since this changes the on-disk format of hash indexes in an

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

2017-03-30 Thread Kyotaro HORIGUCHI
At Fri, 31 Mar 2017 13:37:38 +0900, Michael Paquier wrote in > In my first reviews of the patch, I completely forgot the fact that > BASE_BACKUP does send the start LSN of the backup in the first result > set, so the patch proposed is actually rather useless because the data > you are looking fo

Re: [HACKERS] increasing the default WAL segment size

2017-03-30 Thread Beena Emerson
Hello, Thanks for testing my patch. On 30 Mar 2017 15:10, "Kuntal Ghosh" wrote: On Tue, Mar 28, 2017 at 1:06 AM, Beena Emerson wrote: > On Sat, Mar 25, 2017 at 10:32 PM, Peter Eisentraut > wrote: >> >> At this point, I suggest splitting this patch up into several >> potentially less controver

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

2017-03-30 Thread Kyotaro HORIGUCHI
Thank you having a look on this. # I removed -bugs in CC:. At Fri, 31 Mar 2017 13:40:00 +1100, Venkata B Nagothi wrote in > On Fri, Mar 17, 2017 at 6:48 PM, Kyotaro HORIGUCHI < > horiguchi.kyot...@lab.ntt.co.jp> wrote: > > > Hello, > > > > At Mon, 13 Mar 2017 11:06:00 +1100, Venkata B Nagothi

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

2017-03-30 Thread Craig Ringer
On 31 March 2017 at 04:29, Stephen Frost wrote: > Unless people wish to object, I'll use Michael's patch to remove > --verbose from the top level tomorrow. Sounds good. Maybe add To get more detailed output from tests set PROVE_FLAGS='--verbose' or examine the detailed test output in tmp_check

Re: [HACKERS] WIP: [[Parallel] Shared] Hash

2017-03-30 Thread Thomas Munro
Hi hackers, Thanks very much to Rafia for testing, and to Andres for his copious review feedback. Here's a new version. Changes: 1. Keep all the backing files that are part of a BufFileSet in subdirectories, as suggested by Andres. Now, instead of that unpopular logic for scanning ranges of p

Re: [HACKERS] postgres_fdw IMPORT SCHEMA and partitioned tables

2017-03-30 Thread Amit Langote
On 2017/03/31 13:46, Michael Paquier wrote: > On Fri, Mar 31, 2017 at 1:37 PM, Amit Langote > wrote: >> + >> +For partitioned tables, partitions are automatically excluded from the >> +schema data imported. Only the definition of partitioned tables is >> included >> +to give access

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Craig Ringer
On 31 March 2017 at 01:16, Andres Freund wrote: >> @@ -9633,6 +9643,12 @@ xlog_redo(XLogReaderState *record) >> SetTransactionIdLimit(checkPoint.oldestXid, >> checkPoint.oldestXidDB); >> >> /* >> + * There can be no concurrent writers to oldestCatalogXmin

Re: [HACKERS] postgres_fdw IMPORT SCHEMA and partitioned tables

2017-03-30 Thread Michael Paquier
On Fri, Mar 31, 2017 at 1:37 PM, Amit Langote wrote: > + > +For partitioned tables, partitions are automatically excluded from the > +schema data imported. Only the definition of partitioned tables is > included > +to give access to the full data set of all partitions present remote

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-03-30 Thread Kuntal Ghosh
On Fri, Mar 31, 2017 at 5:43 AM, Neha Khatri wrote: > > On Fri, Mar 31, 2017 at 8:29 AM, Kuntal Ghosh > wrote: >> >> On Fri, Mar 31, 2017 at 2:05 AM, Kuntal Ghosh >> wrote: >> > >> > 1. Put an Assert(0) in ParallelQueryMain(), start server and execute >> > any parallel query. >> > In LaunchPara

Re: [HACKERS] postgres_fdw IMPORT SCHEMA and partitioned tables

2017-03-30 Thread Amit Langote
On 2017/03/31 13:23, Michael Paquier wrote: > On Wed, Mar 29, 2017 at 12:30 PM, Michael Paquier > wrote: >> Users like things that are friendly, and we are most likely going to >> piss them off when using postgres_fdw if they need to list manually >> each parent table from the IMPORT FOREIGN SCHEM

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

2017-03-30 Thread Michael Paquier
On Fri, Mar 31, 2017 at 12:06 AM, Fujii Masao wrote: > I don't think that using psql to run BASE_BACKUP command is good > approach. That's basically what pg_basebackup is made for, and it makes sure that some sanity checks and measures happen. > Instead, IMO you basically should implement the cl

Re: [HACKERS] postgres_fdw IMPORT SCHEMA and partitioned tables

2017-03-30 Thread Michael Paquier
On Wed, Mar 29, 2017 at 12:30 PM, Michael Paquier wrote: > Users like things that are friendly, and we are most likely going to > piss them off when using postgres_fdw if they need to list manually > each parent table from the IMPORT FOREIGN SCHEMA command. > >> However, if we're going to do somet

Re: [HACKERS] Declarative partitioning vs. information_schema

2017-03-30 Thread Amit Langote
On 2017/01/26 3:19, Robert Haas wrote: > On Wed, Jan 25, 2017 at 1:04 PM, Peter Eisentraut > wrote: >> On 1/18/17 2:32 PM, Robert Haas wrote: >>> Unless we can find something official, I suppose we should just >>> display BASE TABLE in that case as we do in other cases. I wonder if >>> the schema

Re: [HACKERS] Something broken around FDW connection close

2017-03-30 Thread Kyotaro HORIGUCHI
At Fri, 31 Mar 2017 12:32:39 +0900, Etsuro Fujita wrote in > On 2017/03/31 8:28, David Rowley wrote: .. > > create server test_server foreign data wrapper postgres_fdw options > > (host 'localhost', port '5432', dbname 'postgres'); > > create foreign table ft_t (a int,b int) server test_server;

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Craig Ringer
On 31 March 2017 at 01:16, Andres Freund wrote: > On 2017-03-29 08:01:34 +0800, Craig Ringer wrote: >> On 28 March 2017 at 23:22, Andres Freund wrote: >> >> >> --- a/doc/src/sgml/protocol.sgml >> >> +++ b/doc/src/sgml/protocol.sgml >> >> @@ -2034,6 +2034,8 @@ The commands accepted in walsender mo

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

2017-03-30 Thread Dmitry Dolgov
On 31 March 2017 at 00:01, Andrew Dunstan wrote: > > I have just noticed as I was writing/testing the non-existent docs for > this patch that it doesn't supply variants of to_tsvector that take a > regconfig as the first argument. Is there a reason for that? Why > should the json(b) versions be di

Re: [HACKERS] WIP: [[Parallel] Shared] Hash

2017-03-30 Thread Rafia Sabih
On Tue, Mar 28, 2017 at 11:11 AM, Rafia Sabih wrote: > On Mon, Mar 27, 2017 at 12:20 PM, Thomas Munro > wrote: >> >> On Sun, Mar 26, 2017 at 3:56 PM, Thomas Munro >> wrote: >> > But... what you said above must be a problem for Windows. I believe >> > it doesn't allow files to be unlinked if the

Re: [HACKERS] Something broken around FDW connection close

2017-03-30 Thread Etsuro Fujita
On 2017/03/31 8:28, David Rowley wrote: create table t (a int, b int); insert into t1 select x/100,x/100 from generate_series(1,10) x; create extension if not exists postgres_fdw; create server test_server foreign data wrapper postgres_fdw options (host 'localhost', port '5432', dbname 'post

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-03-30 Thread Michael Paquier
On Fri, Mar 31, 2017 at 2:33 AM, Tom Lane wrote: > Awhile back in the discussion about the \if feature for psql, > I'd pointed out that you shouldn't really need very much in > the way of boolean-expression evaluation smarts, because you > ought to be able to use a backtick shell escape: > >

Re: [HACKERS] release notes for v10

2017-03-30 Thread Bruce Momjian
On Thu, Mar 30, 2017 at 06:23:04PM -0400, Robert Haas wrote: > Hi, > > One of the things we'll need to do to get 10beta1 out the door is have > a set of release notes. I spoke with Bruce Momjian today at PGCONF.US > and he told me that he has set aside time during April to write them > and will b

Re: [HACKERS] identity columns

2017-03-30 Thread Vitaly Burovoy
On 3/29/17, Peter Eisentraut wrote: > On 3/24/17 05:29, Vitaly Burovoy wrote: >> It would be great if "DROP IDENTITY IF EXISTS" is in the current patch >> since we don't have any disagreements about "DROP IDENTITY" behavior >> and easiness of implementation of "IF EXISTS" there. > > Here is an upd

Re: [HACKERS] sequence data type

2017-03-30 Thread Vitaly Burovoy
On 3/30/17, Vitaly Burovoy wrote: > On 3/29/17, Vitaly Burovoy wrote: >> 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. >>>

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

2017-03-30 Thread Venkata B Nagothi
On Fri, Mar 17, 2017 at 6:48 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Hello, > > At Mon, 13 Mar 2017 11:06:00 +1100, Venkata B Nagothi > wrote in gmail.com> > > On Tue, Jan 17, 2017 at 9:36 PM, Kyotaro HORIGUCHI < > > horiguchi.kyot...@lab.ntt.co.jp> wrote: > > > I manag

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

2017-03-30 Thread Robert Haas
On Thu, Mar 30, 2017 at 2:36 PM, Mithun Cy wrote: > Thanks Robert, I have tried to fix the comments given as below. Thanks. Since this changes the on-disk format of hash indexes in an incompatible way, I think it should bump HASH_VERSION. (Hopefully that doesn't preclude REINDEX?) pg_upgrade s

Re: [HACKERS] sequence data type

2017-03-30 Thread Vitaly Burovoy
On 3/30/17, Vitaly Burovoy wrote: > On 3/29/17, Vitaly Burovoy wrote: >> 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. >>>

Re: [HACKERS] Supporting huge pages on Windows

2017-03-30 Thread Tsunakawa, Takayuki
From: Amit Kapila [mailto:amit.kapil...@gmail.com] > The latest patch looks good to me apart from one Debug message, so I have > marked it as Ready For Committer. Thank you so much! > + ereport(DEBUG1, > + (errmsg("disabling huge pages"))); > > I think this should be similar to what we display

Re: [HACKERS] [PATCH] Generic type subscripting

2017-03-30 Thread Dmitry Dolgov
On 30 March 2017 at 19:36, Arthur Zakirov wrote: > > The last point is about the tutorial. As Tom pointed it is not useful when the tutorial doesn't execute. It happens because there is not "custom" type in subscripting.sql. I'm confused. Maybe I'm missing something, but there is "custom" type in

[HACKERS] tuple-routing and constraint violation error message, revisited

2017-03-30 Thread Amit Langote
Hi, Last message regarding this was by Robert on the original partitioning thread: https://www.postgresql.org/message-id/CA%2BTgmoZjGzSM5WwnyapFaw3GxnDLWh7pm8Xiz8_QWQnUQy%3DSCA%40mail.gmail.com Summary is: We decided in f1b4c771ea7 [1] that passing the original slot (one containing the tuple for

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

2017-03-30 Thread Mengxing Liu
> > 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 it, and I cannot estimate how muc

Re: [HACKERS] Somebody has not thought through subscription locking considerations

2017-03-30 Thread Petr Jelinek
On 30/03/17 07:25, Tom Lane wrote: > 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 >

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-03-30 Thread Neha Khatri
On Fri, Mar 31, 2017 at 8:29 AM, Kuntal Ghosh wrote: > On Fri, Mar 31, 2017 at 2:05 AM, Kuntal Ghosh > wrote: > > > > 1. Put an Assert(0) in ParallelQueryMain(), start server and execute > > any parallel query. > > In LaunchParallelWorkers, you can see > >nworkers = n nworkers_launched

[HACKERS] Something broken around FDW connection close

2017-03-30 Thread David Rowley
create table t (a int, b int); insert into t1 select x/100,x/100 from generate_series(1,10) x; create extension if not exists postgres_fdw; create server test_server foreign data wrapper postgres_fdw options (host 'localhost', port '5432', dbname 'postgres'); create foreign table ft_t (a int,b

[HACKERS] release notes for v10

2017-03-30 Thread Robert Haas
Hi, One of the things we'll need to do to get 10beta1 out the door is have a set of release notes. I spoke with Bruce Momjian today at PGCONF.US and he told me that he has set aside time during April to write them and will begin working on it once we reach feature freeze. I think this is good, b

[HACKERS] End of CommitFest + Feature Freeze Delayed To April 7th

2017-03-30 Thread Robert Haas
Hi, We had a brief stand-up meeting today at PGCONF.US to discuss the proposal to delay the end of the CommitFest and feature freeze. Those present include 9 members of the pgsql-release team (including Peter Eisentraut and myself as members of the RMT) and David Steele as the current CommitFest

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

2017-03-30 Thread Andrew Dunstan
On 29 March 2017 at 16:19, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> 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 >

Re: [HACKERS] Logical replication existing data copy

2017-03-30 Thread Erik Rijkers
(At the moment using these patches for tests:) 0001-Reserve-global-xmin-for-create-slot-snasphot-export.patch + 0002-Don-t-use-on-disk-snapshots-for-snapshot-export-in-l.patch+ 0003-Prevent-snapshot-builder-xmin-from-going-backwards.patch + 0004-Fix-xl_running_xacts-usage-in-snapshot-builder

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-03-30 Thread Kuntal Ghosh
On Fri, Mar 31, 2017 at 2:05 AM, Kuntal Ghosh wrote: > > 1. Put an Assert(0) in ParallelQueryMain(), start server and execute > any parallel query. > In LaunchParallelWorkers, you can see >nworkers = n nworkers_launched = n (n>0) > But, all the workers will crash because of the assert sta

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Anastasia Lubennikova
30.03.2017 19:49, Robert Haas: On Thu, Mar 30, 2017 at 11:26 AM, Teodor Sigaev wrote: I had a look on patch and played with it, seems, it looks fine. I splitted it to two patches: core changes (+bloom index fix) and btree itself. All docs are left in first patch - I'm too lazy to rewrite docume

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Andres Freund
On 2017-03-30 19:40:08 +0100, Simon Riggs wrote: > On 30 March 2017 at 18:16, Andres Freund wrote: > > >> /* > >> * Each page of XLOG file has a header like this: > >> */ > >> -#define XLOG_PAGE_MAGIC 0xD097 /* can be used as WAL version > >> indicator */ > >> +#define XLOG_PAGE_MAGIC

[HACKERS] REFERENCES privilege should not be symmetric (was Re: [GENERAL] Postgres Permissions Article)

2017-03-30 Thread Tom Lane
Paul Jungwirth writes: >> Also I don't understand why you wrote “You need the permission on both >> tables”: Only the owner of a table can add constraints to it > Ah, this piece was really helpful for me in making it click. Thanks so > much! I added a couple new paragraphs to my post with a link

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-03-30 Thread Kuntal Ghosh
On Fri, Mar 31, 2017 at 12:32 AM, Thomas Munro wrote: > On Fri, Mar 31, 2017 at 7:38 AM, Tomas Vondra > wrote: >> Hi, >> >> While doing some benchmarking, I've ran into a fairly strange issue with OOM >> breaking LaunchParallelWorkers() after the restart. What I see happening is >> this: >> >> 1)

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

2017-03-30 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > I'd be fine with removing --verbose globally, as your patch does, but > > there was some argument that we then would have long 'quiet' periods. > > I haven't had a chance to go test if that's really the case yet though.

Re: [HACKERS] [COMMITTERS] pgsql: Default monitoring roles

2017-03-30 Thread Tom Lane
I wrote: > Simon Riggs writes: >> Weird. make check-world just skipped that directory. I guess for Dave also. > If you just did check-world, it probably didn't build contrib modules that > don't have tests, because the "check" target wouldn't do anything without > tests to run. I wondered why th

Re: [HACKERS] New CORRESPONDING clause design

2017-03-30 Thread Pavel Stehule
2017-03-30 21:43 GMT+02:00 Tom Lane : > Pavel Stehule writes: > > Is following use case defined in standard? > > > postgres=# SELECT 0 AS x1, 1 AS a, 0 AS x2, 2 AS b, 0 AS x3, -1 AS x3 > >UNION ALL CORRESPONDING BY(a,b) SELECT 4 AS b, 0 AS x4, 3 AS > a, > > 0 AS x6, -1 AS x6 > >

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

2017-03-30 Thread Pavel Stehule
2017-03-29 20:11 GMT+02:00 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] New CORRESPONDING clause design

2017-03-30 Thread Tom Lane
Pavel Stehule writes: > Is following use case defined in standard? > postgres=# SELECT 0 AS x1, 1 AS a, 0 AS x2, 2 AS b, 0 AS x3, -1 AS x3 >UNION ALL CORRESPONDING BY(a,b) SELECT 4 AS b, 0 AS x4, 3 AS a, > 0 AS x6, -1 AS x6 >UNION ALL CORRESPONDING SELECT 0 AS x8, 6 AS a,

Re: [HACKERS] Monitoring roles patch

2017-03-30 Thread Dave Page
On Thu, Mar 30, 2017 at 2:24 PM, Simon Riggs wrote: > On 30 March 2017 at 18:29, Simon Riggs wrote: > >> Moving to commit this over the next hour. Last chance... > > Done. Great work Dave, thanks everybody. Thanks Simon. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake Enterpr

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Aleksander Alekseev
Hi Robert, > Has anybody done some testing of this patch with the WAL consistency > checker? Like, create some tables with indexes that have INCLUDE > columns, set up a standby, enable consistency checking, pound the > master, and see if the standby bails? I've decided to run such a test. It loo

Re: [HACKERS] New CORRESPONDING clause design

2017-03-30 Thread Pavel Stehule
Hi 2017-03-30 13:11 GMT+02:00 Surafel Temesgen : > hi > > Thank you very much for your help . > here is the patch fix that issue as you suggest > The crash is fixed I did a rebase + few more regress tests. Is following use case defined in standard? postgres=# SELECT 0 AS x1, 1 AS a, 0 AS x2,

Re: [HACKERS] [COMMITTERS] pgsql: Default monitoring roles

2017-03-30 Thread Tom Lane
Simon Riggs writes: > On 30 March 2017 at 19:31, Erik Rijkers wrote: >> The buildfarm is showing red (the same errors that I get...): >> pgrowlocks.c: In function ‘pgrowlocks’: >> pgrowlocks.c:105:65: error: expected ‘)’ before ‘;’ token >> is_member_of_role(GetUserId(), DEFAULT_ROLE_STAT_SCAN_TA

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Andres Freund
On 2017-03-30 18:26:05 +0300, Teodor Sigaev wrote: > Any objection from reviewers to push both patches? > diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c > index f2eda67..59029b9 100644 > --- a/contrib/bloom/blutils.c > +++ b/contrib/bloom/blutils.c > @@ -120,6 +120,7 @@ blhandler(

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-03-30 Thread Thomas Munro
On Fri, Mar 31, 2017 at 7:38 AM, Tomas Vondra wrote: > Hi, > > While doing some benchmarking, I've ran into a fairly strange issue with OOM > breaking LaunchParallelWorkers() after the restart. What I see happening is > this: > > 1) a query is executed, and at the end of LaunchParallelWorkers we g

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Simon Riggs
On 30 March 2017 at 18:16, Andres Freund wrote: >> /* >> * Each page of XLOG file has a header like this: >> */ >> -#define XLOG_PAGE_MAGIC 0xD097 /* can be used as WAL version >> indicator */ >> +#define XLOG_PAGE_MAGIC 0xD100 /* can be used as WAL version >> indicator */ > >

[HACKERS] strange parallel query behavior after OOM crashes

2017-03-30 Thread Tomas Vondra
Hi, While doing some benchmarking, I've ran into a fairly strange issue with OOM breaking LaunchParallelWorkers() after the restart. What I see happening is this: 1) a query is executed, and at the end of LaunchParallelWorkers we get nworkers=8 nworkers_launched=8 2) the query does a Ha

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

2017-03-30 Thread Mithun Cy
Thanks Robert, I have tried to fix the comments given as below. On Thu, Mar 30, 2017 at 9:19 PM, Robert Haas wrote: > I think that the macros in hash.h need some more work: > > - Pretty much any time you use the argument of a macro, you need to > parenthesize it in the macro definition to avoid s

Re: [HACKERS] Monitoring roles patch

2017-03-30 Thread Simon Riggs
On 30 March 2017 at 18:29, Simon Riggs wrote: > Moving to commit this over the next hour. Last chance... Done. Great work Dave, thanks everybody. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql

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

2017-03-30 Thread Daniel Verite
Vaishnavi Prabakaran wrote: > Hmm, With batch mode, after sending COPY command to server(and server > started processing the query and goes into COPY state) , client does not > immediately read the result , but it keeps sending other queries to the > server. By this time, server already en

Re: [HACKERS] [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-30 Thread Fujii Masao
On Thu, Mar 23, 2017 at 9:59 PM, Peter Eisentraut wrote: > Logical replication support for initial data copy + case T_SQLCmd: + if (MyDatabaseId == InvalidOid) + ereport(ERROR, + (errmsg("not connected to database"))); This error message doesn't seem to follow the error message style in docs. Al

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

2017-03-30 Thread Bruce Momjian
On Tue, Mar 21, 2017 at 04:04:58PM -0400, Bruce Momjian wrote: > On Tue, Mar 21, 2017 at 04:56:16PM -0300, Alvaro Herrera wrote: > > Bruce Momjian wrote: > > > On Tue, Mar 21, 2017 at 04:43:58PM -0300, Alvaro Herrera wrote: > > > > Bruce Momjian wrote: > > > > > > > > > I don't think it makes sens

Re: [HACKERS] [PATCH] Generic type subscripting

2017-03-30 Thread Arthur Zakirov
On 29.03.2017 20:14, Arthur Zakirov wrote: I wanted to implement subscripting for ltree or hstore extensions. Subscripting for ltree looks more interesting. Especially with slicing. But I haven't done it yet. I hope that I will implement it tomorrow. ltree - I've implemented fetching ltr

[HACKERS] Variable substitution in psql backtick expansion

2017-03-30 Thread Tom Lane
Awhile back in the discussion about the \if feature for psql, I'd pointed out that you shouldn't really need very much in the way of boolean-expression evaluation smarts, because you ought to be able to use a backtick shell escape: \if `expr :foo \> :bar` \echo :foo is grea

Re: [HACKERS] Monitoring roles patch

2017-03-30 Thread Simon Riggs
On 29 March 2017 at 21:42, Dave Page wrote: > 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

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Andres Freund
On 2017-03-29 08:01:34 +0800, Craig Ringer wrote: > On 28 March 2017 at 23:22, Andres Freund wrote: > > >> --- a/doc/src/sgml/protocol.sgml > >> +++ b/doc/src/sgml/protocol.sgml > >> @@ -2034,6 +2034,8 @@ The commands accepted in walsender mode are: > >> > >>Drops a replication slo

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Andres Freund
> @@ -9633,6 +9643,12 @@ xlog_redo(XLogReaderState *record) > SetTransactionIdLimit(checkPoint.oldestXid, > checkPoint.oldestXidDB); > > /* > + * There can be no concurrent writers to oldestCatalogXmin > during > + * recovery, so no need to

Re: [HACKERS] Use \if ... \elif ... \else ... \endif to simplify alternative in psql scripting.

2017-03-30 Thread Tom Lane
Andres Freund writes: > On 2017-03-30 16:59:39 +, Tom Lane wrote: >> Support \if ... \elif ... \else ... \endif in psql scripting. > Could we use this to simplify maintenance of some of the larger > alternative output files? Worth thinking about, for sure. regards, t

[HACKERS] Use \if ... \elif ... \else ... \endif to simplify alternative in psql scripting.

2017-03-30 Thread Andres Freund
On 2017-03-30 16:59:39 +, Tom Lane wrote: > Support \if ... \elif ... \else ... \endif in psql scripting. Could we use this to simplify maintenance of some of the larger alternative output files? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your s

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

2017-03-30 Thread Joe Conway
On 03/30/2017 10:59 AM, Magnus Hagander wrote: > On Thu, Mar 30, 2017 at 4:40 PM, Tom Lane > wrote: > > Robert Haas mailto:robertmh...@gmail.com>> > writes: > > On Thu, Mar 30, 2017 at 9:41 AM, Bruce Momjian > wrote: > >> I prop

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

2017-03-30 Thread Tom Lane
Fabien COELHO writes: >> If it actually is impossible to give pgbench equivalent behavior, we'll >> just have to live with the discrepancy, > Yep. >> but ISTM it could probably be made to work. > Even if it could somehow, I do not see it as a useful feature for pgbench. Perhaps not. > I als

Re: [HACKERS] delta relations in AFTER triggers

2017-03-30 Thread Kevin Grittner
On Thu, Mar 23, 2017 at 11:36 PM, Thomas Munro wrote: > One more thought: should this be allowed? > > postgres=# create table mytab (i int) partition by list (i); > CREATE TABLE > postgres=# create table mytab1 partition of mytab for values in (42); > CREATE TABLE > postgres=# create function my_

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Robert Haas
On Thu, Mar 30, 2017 at 11:26 AM, Teodor Sigaev wrote: > I had a look on patch and played with it, seems, it looks fine. I splitted > it to two patches: core changes (+bloom index fix) and btree itself. All > docs are left in first patch - I'm too lazy to rewrite documentation which > is changed i

Re: [HACKERS] [COMMITTERS] pgsql: Allow vacuums to report oldestxmin

2017-03-30 Thread Fujii Masao
On Wed, Mar 29, 2017 at 3:31 PM, Masahiko Sawada wrote: > On Wed, Mar 29, 2017 at 1:32 AM, Fujii Masao wrote: >> On Tue, Mar 28, 2017 at 1:06 AM, Masahiko Sawada >> wrote: >>> On Sun, Mar 26, 2017 at 2:26 AM, Masahiko Sawada >>> wrote: On Sun, Mar 26, 2017 at 1:37 AM, Fujii Masao wrote:

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

2017-03-30 Thread Fabien COELHO
Hello Tom, pgbench (well, at least if I succeed in getting boolean expressions and setting variables, which is just a maybe), but this kind of if in the middle of expression does not make much sense for a pgbench script where "if" must be evaluated at execution time, not parse time. Well, it'

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Aleksander Alekseev
Hi Teodor, > I had a look on patch and played with it, seems, it looks fine. I splitted > it to two patches: core changes (+bloom index fix) and btree itself. All > docs are left in first patch - I'm too lazy to rewrite documentation which > is changed in second patch. > Any objection from reviewe

Re: [HACKERS] PDF build is broken

2017-03-30 Thread Devrim Gündüz
Hi Peter, On Sun, 2017-03-26 at 15:05 -0400, Peter Eisentraut wrote: > Fixed.  (Sorry for the late response): Thanks, it builds fine. > But I also suggest that you try out the FOP based builds, > because the jadetex-based builds will probably go away soon. Can you please let me know how I wil

[HACKERS] Re: [pgsql-students] GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree"

2017-03-30 Thread Kevin Grittner
On Tue, Mar 28, 2017 at 12:36 PM, Shubham Barai wrote: > * Hash Index > currently, I am trying to understand how the splitting of bucket works. > should we acquire predicate lock on every page from an old and new bucket in > case there is a predicate lock on a page of an old bucket? For page le

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

2017-03-30 Thread Robert Haas
On Thu, Mar 30, 2017 at 11:41 AM, Andres Freund wrote: > On 2017-03-30 16:43:41 +0530, Pavan Deolasee wrote: >> Looks like OID conflict to me.. Please try rebased set. > > Pavan, Alvaro, everyone: I know you guys are working very hard on this, > but I think at this point it's too late to commit th

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-03-30 Thread Pavel Stehule
> > This proposal was here already - maybe two years ago. The psql command parser doesn't allow any complex syntax - more - the more parameters in one psql commands is hard to remember, hard to read. >>> >>> Could you please provide a link to this discussion. Probably work

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

2017-03-30 Thread Robert Haas
On Wed, Mar 29, 2017 at 8:03 AM, Mithun Cy wrote: > Thanks, Amit for a detailed review. I think that the macros in hash.h need some more work: - Pretty much any time you use the argument of a macro, you need to parenthesize it in the macro definition to avoid surprises if the macros is called us

[HACKERS] Re: [pgsql-students] GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree"

2017-03-30 Thread Kevin Grittner
On Tue, Mar 28, 2017 at 12:36 PM, Shubham Barai wrote: > My name is Shubham Barai and I am a final year student at Maharashtra > Institute of Technology, Pune, India. I am very interested in contributing > Postgresql this year through GSoC project. Welcome! Sorry I didn't spot this post earlier

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

2017-03-30 Thread Tom Lane
Fabien COELHO writes: >> [...] Aside from cosmetic changes, I've made it behave reasonably for >> cases where \if is used on portions of a query, for instance > A small issue I see is that I was planning to add such an if syntax to > pgbench (well, at least if I succeed in getting boolean expre

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

2017-03-30 Thread Andres Freund
Hi, On 2017-03-30 16:43:41 +0530, Pavan Deolasee wrote: > Looks like OID conflict to me.. Please try rebased set. Pavan, Alvaro, everyone: I know you guys are working very hard on this, but I think at this point it's too late to commit this for v10. This is patch that's affecting the on-disk for

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Teodor Sigaev
I had a look on patch and played with it, seems, it looks fine. I splitted it to two patches: core changes (+bloom index fix) and btree itself. All docs are left in first patch - I'm too lazy to rewrite documentation which is changed in second patch. Any objection from reviewers to push both pa

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Teodor Sigaev
- IDENTITY_P IF_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IMPORT_P IN_P + IDENTITY_P IF_P ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IMPORT_P IN_P INCLUDE I think your syntax would read no worse, possibly even better, if you just used the existing INCLUDING keyword. It was a discussion in thi

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

2017-03-30 Thread Kevin Grittner
On Wed, Mar 29, 2017 at 11:17 PM, Mengxing Liu wrote: > 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

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-03-30 Thread Alexander Korotkov
On Tue, Mar 28, 2017 at 10:12 AM, Pavel Stehule wrote: > 2017-03-27 13:59 GMT+02:00 Alexander Korotkov : > >> On Fri, Mar 10, 2017 at 6:06 PM, Pavel Stehule >> wrote: >> >>> 2017-03-10 16:00 GMT+01:00 Alexander Korotkov >> >: >>> On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost wrote: >

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

2017-03-30 Thread Tom Lane
Stephen Frost writes: > I'd be fine with removing --verbose globally, as your patch does, but > there was some argument that we then would have long 'quiet' periods. > I haven't had a chance to go test if that's really the case yet though. I've been running it like this lately: make -s check-wor

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

2017-03-30 Thread Fujii Masao
On Wed, Mar 29, 2017 at 5:36 PM, Kyotaro HORIGUCHI wrote: > 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 M

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

2017-03-30 Thread Mithun Cy
On Thu, Mar 30, 2017 at 7:23 PM, Robert Haas wrote: > I think approach B is incorrect. Suppose we have 1536 buckets and > hash values 2048, 2049, 4096, 4097, 6144, 6145, 8192, and 8193. If I > understand correctly, each of these values should be mapped either to > bucket 0 or to bucket 1, and th

  1   2   >