Re: [HACKERS] Allow interrupts on waiting standby

2017-03-30 Thread Tsunakawa, Takayuki
Hi Michael, Simon, From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael Paquier > > Oh, I see. But how does the startup process respond quickly? It seems > that you need to call HandleStartupProcInterrupts() instead of > CHECK_FOR_INTERRUPTS

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

2017-03-30 Thread Ideriha, Takeshi
Thank you for prompt check! >As per above test steps, it doesn't produce the results and doesn't >generate the error also. I feel this needs to be fixed. >As we are at the end of commitfest, it is better you can move it >to next one commitfest and provide an updated patch to solve the >above prob

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

2017-03-30 Thread Fabien COELHO
Hello Tom, Patch applies cleanly. Make check ok. Feature still works! Idem for v30. [...] Aside from cosmetic changes, I've made it behave reasonably for cases where \if is used on portions of a query, for instance SELECT \if :something var1 \else var2 \endif FROM table; This is c

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Craig Ringer
On 30 March 2017 at 11:34, Craig Ringer wrote: > 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 raise

[HACKERS] inconsistent page found on STANDBY server

2017-03-30 Thread Ashutosh Sharma
Hi All, When running make installcheck on a master with wal consistency check enabled, inconsistent page is detected on standby. I could see the following FATAL message in the standby server logfile, 2017-03-30 07:31:10.101 BST [27994] LOG: entering standby mode 2017-03-30 07:31:10.106 BST [2799

Re: [HACKERS] Getting server crash after running sqlsmith

2017-03-30 Thread tushar
On 03/29/2017 12:06 AM, Tom Lane wrote: Hm ... I don't see a crash here, I am getting this issue only on Linux3. but I wonder whether you have parameters set that would cause this query to be run as a parallel query? Because pg_rotate_logfile() is marked as parallel-safe in pg_proc, which se

Re: [HACKERS] ANALYZE command progress checker

2017-03-30 Thread Masahiko Sawada
On Wed, Mar 29, 2017 at 5:38 PM, vinayak wrote: > > 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.

Re: [HACKERS] inconsistent page found on STANDBY server

2017-03-30 Thread Amit Kapila
On Thu, Mar 30, 2017 at 1:55 PM, Ashutosh Sharma wrote: > > RCA: > > After debugging the hash index code for deletion, I could find that > while registering data for xlog record 'XLOG_HASH_UPDATE_META_PAGE' we > are not passing the correct length of data being registered and > therefore, data

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-03-30 Thread Ashutosh Bapat
This should be added to the open items list. I am not able to add it myself, as I don't have "editor" privileges on open items wiki. I have requested for those privileges. On Thu, Mar 30, 2017 at 7:00 AM, Shinoda, Noriyoshi wrote: > Hello, > > I tried this feature using most recently snapshot. In

Re: [HACKERS] crashes due to setting max_parallel_workers=0

2017-03-30 Thread Rushabh Lathia
On Wed, Mar 29, 2017 at 8:38 AM, Tomas Vondra wrote: > Hi, > > On 03/28/2017 11:07 AM, Rushabh Lathia wrote: > >> ... >> I think we all agree that we should get rid of nreaders from the >> GatherMergeState and need to do some code re-factor. But if I >> understood correctly that Robert's concern

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-03-30 Thread Amit Langote
On 2017/03/30 18:02, Ashutosh Bapat wrote: > This should be added to the open items list. I am not able to add it > myself, as I don't have "editor" privileges on open items wiki. I have > requested for those privileges. I am going to shortly, after I reply to Shinoda-san's report. While the cras

Re: [HACKERS] ANALYZE command progress checker

2017-03-30 Thread vinayak
On 2017/03/30 17:39, Masahiko Sawada wrote: On Wed, Mar 29, 2017 at 5:38 PM, vinayak wrote: 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 documen

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-30 Thread Amit Langote
On 2017/03/29 23:58, Robert Haas wrote: > 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_PARTITIONE

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

2017-03-30 Thread Ashutosh Bapat
> On Wed, Mar 29, 2017 at 8:39 AM, Robert Haas wrote: > I don't think 0011 is likely to be acceptable in current form. I > can't imagine that we just went to the trouble of getting rid of > AppendRelInfos for child partitioned rels only to turn around and put > them back again. If you just need

Re: [HACKERS] increasing the default WAL segment size

2017-03-30 Thread Kuntal Ghosh
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 controversial pieces. >> >> One big piece is that we currently don't support segment sizes la

Re: [HACKERS] Partitioning vs ON CONFLICT

2017-03-30 Thread Amit Langote
Shinoda-san, Thanks a lot for testing. On 2017/03/30 10:30, Shinoda, Noriyoshi wrote: > 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 th

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

2017-03-30 Thread Venkata B Nagothi
On Thu, Mar 30, 2017 at 4:46 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Hello, > > At Thu, 30 Mar 2017 15:59:14 +1100, Venkata B Nagothi > wrote in xwu0j05x_j...@mail.gmail.com> > > Yes, downloaded from the email on Windows and copied across to Linux and > > did "git apply

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

2017-03-30 Thread Dilip Kumar
On Wed, Mar 29, 2017 at 11:51 AM, Pavan Deolasee wrote: > Thanks. I think your patch of tracking interesting attributes seems ok too > after the performance issue was addressed. Even though we can still improve > that further, at least Mithun confirmed that there is no significant > regression any

Re: [HACKERS] Supporting huge pages on Windows

2017-03-30 Thread Amit Kapila
On Thu, Mar 9, 2017 at 7:06 AM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Ashutosh Sharma >> To start with, I ran the regression test-suite and didn't find any failures. >> But, then I am not sure if huge_pages

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

2017-03-30 Thread Amit Langote
On 2017/03/30 18:35, Ashutosh Bapat wrote: >> On Wed, Mar 29, 2017 at 8:39 AM, Robert Haas wrote: >> I don't think 0011 is likely to be acceptable in current form. I >> can't imagine that we just went to the trouble of getting rid of >> AppendRelInfos for child partitioned rels only to turn aroun

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

2017-03-30 Thread Pavan Deolasee
On Wed, Mar 29, 2017 at 4:42 PM, Amit Kapila wrote: > 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 compr

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-30 Thread Kyotaro HORIGUCHI
Hello, At Thu, 30 Mar 2017 18:24:16 +0900, Amit Langote wrote in > On 2017/03/29 23:58, Robert Haas wrote: > > 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

Re: [HACKERS] New CORRESPONDING clause design

2017-03-30 Thread Surafel Temesgen
hi Thank you very much for your help . here is the patch fix that issue as you suggest Regards Surafel On Tue, Mar 28, 2017 at 5:44 PM, Pavel Stehule wrote: > > > 2017-03-28 14:18 GMT+02:00 Pavel Stehule : > >> >> >> 2017-03-28 13:58 GMT+02:00 Surafel Temesgen : >> >>> can you help with fixi

Re: [HACKERS] postgres_fdw bug in 9.6

2017-03-30 Thread Ashutosh Bapat
The patch applies cleanly, compiles. make check in regress as well as postgres_fdw works fine. Here are few comments local-join should be local join. The comments should explain why. +/* Should be unparameterized */ +Assert(outer_path->param_info == NULL); +Assert(inner_pa

Re: [HACKERS] sequence data type

2017-03-30 Thread Vitaly Burovoy
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. >> >> This is the default behavior for ages, s

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

2017-03-30 Thread Amit Kapila
On Thu, Mar 30, 2017 at 4:07 PM, Pavan Deolasee wrote: > > On Wed, Mar 29, 2017 at 4:42 PM, Amit Kapila > wrote: >> >> 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

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-30 Thread Amit Langote
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 Langote >> > wrote: >> >> Looks correct, so incorporated in the attached

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-03-30 Thread Peter Moser
2017-03-01 10:56 GMT+01:00 Peter Moser : > A similar walkthrough for ALIGN will follow soon. > > We are thankful for any suggestion or ideas, to be used to write a > good SGML documentation. The attached README explains the ALIGN operation step-by-step with a TEMPORAL LEFT OUTER JOIN example. That

Re: [HACKERS] Page Scan Mode in Hash Index

2017-03-30 Thread Jesper Pedersen
Hi Ashutosh, On 03/29/2017 09:16 PM, Ashutosh Sharma wrote: This patch needs a rebase. Please try applying these patches on top of [1]. I think you should be able to apply it cleanly. Sorry, I think I forgot to mention this point in my earlier mail. [1] - https://www.postgresql.org/message-id

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

2017-03-30 Thread Pavan Deolasee
On Thu, Mar 30, 2017 at 5:27 PM, Amit Kapila wrote: > > > How have you verified that? Have you checked that in > heap_prepare_insert it has called toast_insert_or_update() and then > returned a tuple different from what the input tup is? Basically, I > am easily able to see it and even the reas

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

2017-03-30 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Mar 30, 2017 at 4:08 AM, Stephen Frost wrote: > >> > If there's a way to change the verbosity for just those scripts, I'd be > >> > happy to do that, if we're unable to agree on reducing it across the > >> > board.. > >> > >>

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

2017-03-30 Thread Michael Paquier
On Thu, Mar 30, 2017 at 9:52 PM, Stephen Frost wrote: > Michael, > > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> On Thu, Mar 30, 2017 at 4:08 AM, Stephen Frost wrote: >> >> > If there's a way to change the verbosity for just those scripts, I'd be >> >> > happy to do that, if we're una

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

2017-03-30 Thread Alvaro Herrera
Stephen Frost wrote: > 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. Michael said that a running counter was displayed, which p

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

2017-03-30 Thread Craig Ringer
On 30 March 2017 at 20:57, Michael Paquier wrote: > I don't see much the point to have --verbose enabled by default, but > if that's the consensus I have nothing better to propose than adding > something like that to the command launching the prove command: $(if > $(PG_PROVE_FLAGS),$(PG_PROVE_FLA

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

2017-03-30 Thread Bruce Momjian
On Tue, Mar 28, 2017 at 11:35:17PM -0400, Tom Lane wrote: > Well, formally speaking, the RMT declares the onset of feature freeze. > I expressed an opinion that they'd probably do so at the end of March, > but it's their call as to exactly when to do so, and whether to grant > any limited extension

[HACKERS] Typo in libpq

2017-03-30 Thread Daniel Gustafsson
There seems to be a typo in libpq as per attached, “..we will loose error messages” should probably be “..we will lose error messages”. cheers ./daniel typo-libpq-loose.diff Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

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

2017-03-30 Thread Robert Haas
On Tue, Mar 28, 2017 at 1:13 AM, Mithun Cy wrote: > B. In tuple sort we can use hash function bucket = hash_key % > num_buckets instead of existing one which does bitwise "and" to > determine the bucket of hash key. This way we will not wrongly assign > buckets beyond max_buckets and sorted hash k

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

2017-03-30 Thread Robert Haas
On Thu, Mar 30, 2017 at 6:37 AM, Pavan Deolasee wrote: > I think we can fix that by comparing compressed values. I know you had > raised concerns, but Robert confirmed that (IIUC) it's not a problem today. I'm not sure that's an entirely fair interpretation of what I said. My point was that, whi

Re: [HACKERS] multivariate statistics (v25)

2017-03-30 Thread David Rowley
On 25 March 2017 at 07:35, Alvaro Herrera wrote: > As I said in another thread, I pushed parts 0002,0003,0004. Tomas said > he would try to rebase patches 0001,0005,0006 on top of what was > committed. My intention is to give that one a look as soon as it is > available. So we will have n-dist

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

2017-03-30 Thread Pavan Deolasee
On Thu, Mar 30, 2017 at 7:27 PM, Robert Haas wrote: > On Thu, Mar 30, 2017 at 6:37 AM, Pavan Deolasee > wrote: > > I think we can fix that by comparing compressed values. I know you had > > raised concerns, but Robert confirmed that (IIUC) it's not a problem > today. > > I'm not sure that's an

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

2017-03-30 Thread Robert Haas
On Thu, Mar 30, 2017 at 9:41 AM, Bruce Momjian wrote: > I agree we need to extend, and not wait until any longer to do it. We > have people at the NYC conference and I don't want their memory of the > conference being that they were stressed trying to work on closing the > commit fest --- that co

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

2017-03-30 Thread Amit Kapila
On Thu, Mar 30, 2017 at 5:55 PM, Pavan Deolasee wrote: > > On Thu, Mar 30, 2017 at 5:27 PM, Amit Kapila > wrote: >> >> >> >> How have you verified that? Have you checked that in >> heap_prepare_insert it has called toast_insert_or_update() and then >> returned a tuple different from what the inp

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

2017-03-30 Thread Robert Haas
On Thu, Mar 30, 2017 at 10:08 AM, Amit Kapila wrote: > I think we should not consider doing compression and decompression as > free at this point in code, because we hold a buffer lock during > recheck. Buffer locks are meant for short-term locks (it is even > mentioned in storage/buffer/README),

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Simon Riggs
On 30 March 2017 at 09:07, Craig Ringer wrote: > Attached. * Cleaned up in 3 places * Added code for faked up RunningTransactions in xlog.c * Ensure catalog_xmin doesn't go backwards All else looks good. Comments before commit? -- Simon Riggshttp://www.2ndQuadrant.com/ Postgre

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Andres Freund
On 2017-03-30 15:26:02 +0100, Simon Riggs wrote: > On 30 March 2017 at 09:07, Craig Ringer wrote: > > > Attached. > > * Cleaned up in 3 places > * Added code for faked up RunningTransactions in xlog.c > * Ensure catalog_xmin doesn't go backwards > > All else looks good. Comments before commit?

Re: [HACKERS] Logical decoding on standby

2017-03-30 Thread Simon Riggs
On 30 March 2017 at 15:27, Andres Freund wrote: > On 2017-03-30 15:26:02 +0100, Simon Riggs wrote: >> On 30 March 2017 at 09:07, Craig Ringer wrote: >> >> > Attached. >> >> * Cleaned up in 3 places >> * Added code for faked up RunningTransactions in xlog.c >> * Ensure catalog_xmin doesn't go back

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

2017-03-30 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 30, 2017 at 9:41 AM, Bruce Momjian wrote: >> I propose we go for a week delay in closing the commit fest, and we >> decide right now. Ideally I like to to see delay in one-week increments >> _and_ announce that a week before each deadline. > Summary of opinions

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

2017-03-30 Thread Petr Jelinek
On 30/03/17 16:04, Pavan Deolasee wrote: > > > On Thu, Mar 30, 2017 at 7:27 PM, Robert Haas > wrote: > > On Thu, Mar 30, 2017 at 6:37 AM, Pavan Deolasee > mailto:pavan.deola...@gmail.com>> wrote: > > I think we can fix that by comparing compressed value

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

2017-03-30 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > On Thu, Mar 30, 2017 at 9:41 AM, Bruce Momjian wrote: > >> I propose we go for a week delay in closing the commit fest, and we > >> decide right now. Ideally I like to to see delay in one-week increments > >> _and_ announce that a

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

2017-03-30 Thread Petr Jelinek
On 30/03/17 16:54, Alvaro Herrera wrote: > Robert Haas wrote: > >> - Alvaro proposes allowing more time next time, but not to change the >> dates for this time. > > FWIW I didn't realize that the NY conference was ongoing, so count me > for postponing the end of the current CF. > +1, the confer

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

2017-03-30 Thread Magnus Hagander
On Thu, Mar 30, 2017 at 4:40 PM, Tom Lane wrote: > Robert Haas writes: > > On Thu, Mar 30, 2017 at 9:41 AM, Bruce Momjian wrote: > >> I propose we go for a week delay in closing the commit fest, and we > >> decide right now. Ideally I like to to see delay in one-week increments > >> _and_ anno

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

2017-03-30 Thread Alvaro Herrera
Robert Haas wrote: > - Alvaro proposes allowing more time next time, but not to change the > dates for this time. FWIW I didn't realize that the NY conference was ongoing, so count me for postponing the end of the current CF. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ Postgre

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >