Re: [HACKERS] New CORRESPONDING clause design

2017-03-14 Thread Surafel Temesgen
hi Some errors are related to just CORRESPONDING without any columns. So using > expr doesn't help here. So parse node CORRESPONDING can solve both issues. > > In current implementation pointing to a node means pointing to a node’s first element so I don’t think we can be able to point to

Re: [HACKERS] scram and \password

2017-03-14 Thread Joe Conway
On 03/14/2017 03:15 AM, Heikki Linnakangas wrote: > On 03/14/2017 04:47 AM, Tom Lane wrote: >> Robert Haas writes: >>> I'm not talking about changing the default, just having it be possible >>> to use \password with the new system as it was with the old, whatever >>>

Re: [HACKERS] Backend crash on non-exclusive backup cancel

2017-03-14 Thread Anastasia Lubennikova
As far as I understand, in this thread were discussed two bugs of pg_stop_backup(). Thanks to the clear descriptions above, I easily reproduced both of them. BUG#1: Server crashes on assertion on call of pg_stop_backup(false) after interrupted call of pg_stop_backup(false). TRAP:

Re: [HACKERS] Bug: timestamp without time zone column allows timestamptz default

2017-03-14 Thread Tom Lane
David Fetter writes: > CREATE TABLE bar(t TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP); > This is a foot gun we need not have. Yes, we do need to have it. (1) if we remove the implicit cast from timestamptz to timestamp, the villagers will be on our doorsteps

[HACKERS] Bug: timestamp without time zone column allows timestamptz default

2017-03-14 Thread David Fetter
Folks, What happens now: CREATE TABLE bar(id int DEFAULT 'a'); ERROR: invalid input syntax for integer: "a" Good so far. Now with a different data type. CREATE TABLE bar(t TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP); CREATE TABLE This is a foot gun we need not

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-14 Thread Heikki Linnakangas
On 03/14/2017 08:53 AM, Andres Freund wrote: Besides that, this version has: - pgindented most of the affected pieces (i.e. all significant new code has been reindent, not all touched one) I think you'll need to add all the inner structs ExprEvalStep typedefs.list to indent them right.

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-14 Thread David Steele
On 3/14/17 4:23 AM, Tsunakawa, Takayuki wrote: > From: David Steele [mailto:da...@pgmasters.net] 3.The default location of the SSL key file is $PGDATA, so the permission >> of the key file is likely to become 0640. But the current postgres requires >> it to be 0600. See

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

2017-03-14 Thread Ashutosh Sharma
On Mar 14, 2017 5:37 PM, "Alvaro Herrera" wrote: Ashutosh Sharma wrote: > Yes. But, as i said earlier I am getting negative checksum value for > page_header as well. Isn't that wrong. For eg. When I debug the > following query, i could pd_checksum value as '40074' in

Re: [HACKERS] wait events for disk I/O

2017-03-14 Thread Rahila Syed
Hello, I applied and tested this patch on latest sources and it works fine. Following are some comments, >+ /* Wait event for SNRU */ >+ WAIT_EVENT_READ_SLRU_PAGE, Typo in the comment. >FileWriteback(v->mdfd_vfd, seekpos, (off_t) BLCKSZ * nflush, WAIT_EVENT_FLUSH_DATA_BLOCK); This call is

Re: [HACKERS] Patch: Optimize memory allocation in function 'bringetbitmap'

2017-03-14 Thread Alvaro Herrera
David Steele wrote: > On 3/4/17 12:43 AM, Robert Haas wrote: > > I think we should regard this resubmission as untimely, unless there > > is an argument that it amounts to a bug fix. > > I agree and I'm also confused about which author this is waiting on. Is > it Jinyu or Álvaro? I don't think

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

2017-03-14 Thread David Steele
On 3/4/17 2:20 AM, Michael Paquier wrote: > On Sat, Mar 4, 2017 at 1:13 AM, Bernd Helmle wrote: >> Ah right, i assumed there must be something, otherwise the comment >> won't be there ;) >> >> We could special case that part to distinguish fetch/stream mode, but i >> fear

Re: [HACKERS] Patch: Optimize memory allocation in function 'bringetbitmap'

2017-03-14 Thread David Steele
On 3/4/17 12:43 AM, Robert Haas wrote: > On Wed, Mar 1, 2017 at 11:28 PM, Alvaro Herrera > wrote: >> Alvaro Herrera wrote: >>> Jinyu Zhang wrote: >>> Update the patch_brin_optimze_mem according to your comment. >>> >>> I have added this patch to the commitfest,

Re: [HACKERS] [POC] hash partitioning

2017-03-14 Thread David Steele
On 3/3/17 8:33 AM, amul sul wrote: > On Fri, Mar 3, 2017 at 5:00 PM, Greg Stark > It also has the advantage that it's easier to see how to add more > partitions. You just split all the ranges and (and migrate the > data...). There's even the possibility of having

Re: [HACKERS] Gather Merge

2017-03-14 Thread Tom Lane
Robert Haas writes: > Cool, thanks for the review. I'm not quite confident that we've found > all of the bugs here yet, but I think we're moving in the right > direction. I guess the real question here is why isn't Gather Merge more like Append and MergeAppend? That is,

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

2017-03-14 Thread David Steele
On 3/2/17 11:34 AM, Petr Jelinek wrote: > On 02/03/17 13:23, Craig Ringer wrote: >> >> I particularly dislike calling a commit callback for an abort. So I'd >> like to look further into the interface side of things. I'm inclined >> to suggest adding new callbacks for 2pc prepare, commit and

[HACKERS] Re: Authentication tests, and plain 'password' authentication with a SCRAM verifier

2017-03-14 Thread Michael Paquier
On Tue, Mar 14, 2017 at 9:36 PM, Heikki Linnakangas wrote: > While looking at the test, I noticed that the SCRAM patch didn't include > support for logging in with plain 'password' authentication, when the user > has a SCRAM verifier stored in pg_authid. That was an oversight. If

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-14 Thread Ashutosh Bapat
Added this to 2017/7 commitfest to keep a track of it. On Wed, Mar 8, 2017 at 3:39 PM, Amit Langote wrote: > On 2017/03/08 18:27, Ashutosh Bapat wrote: >>> >>> About the other statement you changed, I just realized that we should >>> perhaps do one more thing.

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-14 Thread Ashutosh Bapat
Added this to 2017/07 commitfest. On Fri, Mar 10, 2017 at 10:03 AM, Ashutosh Bapat wrote: >>> >>> The new name merge_fdw_options() is shorter than the one I chose, but >>> we are not exactly merging options for an upper relation since there >>> isn't the other

Re: [HACKERS] IF NOT EXISTS option for CREATE SERVER and CREATE USER MAPPING statements

2017-03-14 Thread Ashutosh Bapat
> > Thanks for catching that. > It was caused by a conflict on applying of the patch. > Updated versions of both patches are attached. > We do not need extra line + + other usages of this do not have an extra line. Removed the extra line in the attached patch. I noticed that the earlier

[HACKERS] Authentication tests, and plain 'password' authentication with a SCRAM verifier

2017-03-14 Thread Heikki Linnakangas
Hi, I didn't include the authentication TAP tests that Michael wrote in the main SCRAM commit last week. The main issue was that the new test was tacked on the src/test/recovery test suite, for lack of a better place. I propose that we add a whole new src/test/authentication directory for

Re: [HACKERS] Page Scan Mode in Hash Index

2017-03-14 Thread Ashutosh Sharma
Hi, >> I've assigned to review this patch. >> At first, I'd like to notice that I like idea and general design. >> Secondly, patch set don't apply cleanly to master. Please, rebase it. > > > Thanks for showing your interest towards this patch. I would like to > inform that this patch has got

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

2017-03-14 Thread Alvaro Herrera
Ashutosh Sharma wrote: > Yes. But, as i said earlier I am getting negative checksum value for > page_header as well. Isn't that wrong. For eg. When I debug the > following query, i could pd_checksum value as '40074' in gdb where > page_header shows it as '-25462'. Yes; the point is that this is

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

2017-03-14 Thread Ashutosh Bapat
Thanks for the review. > > Some very high-level thoughts based on a look through these patches: > > In 0001, you've removed a comment about how GEQO needs special > handling, but it doesn't look as if you've made any compensating > change elsewhere. That seems unlikely to be correct. If GEQO

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

2017-03-14 Thread Ashutosh Bapat
On Tue, Mar 14, 2017 at 6:28 AM, Amit Langote wrote: > On 2017/03/14 9:17, Robert Haas wrote: >> On Mon, Mar 13, 2017 at 3:24 PM, Robert Haas wrote: >>> Haven't looked at 0007 yet. >> >> Overall this one looks pretty good and straightforward.

Re: [HACKERS] Microvacuum support for Hash Index

2017-03-14 Thread Ashutosh Sharma
Hi, Attached is the v6 patch for microvacuum in hash index rebased on top of 'v10 patch for WAL in hash index - [1]' and 'v1 patch for WAL consistency check for hash index - [2]'. [1] -

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2017-03-14 Thread Robert Haas
On Mon, Mar 13, 2017 at 10:22 PM, Craig Ringer wrote: > I'll introduce a new LWLock, ClogTruncationLock, which will be held > from when we advance the new clogOldestXid field through to when clog > truncation completes. +1. -- Robert Haas EnterpriseDB:

Re: [HACKERS] Gather Merge

2017-03-14 Thread Robert Haas
On Tue, Mar 14, 2017 at 5:47 AM, Rushabh Lathia wrote: > Thanks Robert for the patch and the explanation. > > I studied the patch and that look right to me. I performed manual testing, > run the scripts which I created during the gather merge patch also run > the tpch

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-14 Thread Alvaro Herrera
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 3d6a3801c0..d205101b89 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -47,7 +47,14 @@ #include "utils/rel.h" -static bool get_last_attnums(Node *node, ProjectionInfo

Re: [HACKERS] [COMMITTERS] pgsql: Improve postmaster's logging of listen socket creation.

2017-03-14 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Andres Freund writes: > > I don't mind the new output, but I kinda wonder whether it's a good idea > > to include the '.s.PGSQL.5432' bit in the host and/or whether we > > shouldn't include the port in the TCP cases as well > > Yeah,

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-14 Thread Alvaro Herrera
Andres Freund wrote: > EEO_SWITCH(op->opcode) > { > EEO_CASE(EEO_DONE): > goto out; Oh my. > which is a bit annoying. (the EEO_CASE is either a jump label or a case > statement, depending on computed goto availability). > > It seems we could either: > 1) live with the damage >

Re: [HACKERS] [PATCH] Use $ parameters as replacement characters for pg_stat_statements

2017-03-14 Thread Robert Haas
On Mon, Mar 13, 2017 at 6:05 PM, Tom Lane wrote: > Robert Haas writes: >> On Sat, Mar 4, 2017 at 1:52 PM, Peter Geoghegan wrote: >>> I'd be in favor of a change >>> that makes it easier to copy and paste a query, to run EXPLAIN and so >>>

Re: [HACKERS] exposing wait events for non-backends (was: Tracking wait event for latches)

2017-03-14 Thread Kuntal Ghosh
On Tue, Mar 14, 2017 at 1:50 PM, Michael Paquier wrote: > Here is a first pass on this patch. Thanks Michael for the review. > > void > -pgstat_bestart(void) > +pgstat_procstart(void) > I would not have thought that this patch justifies potentially > breaking

Re: [HACKERS] Re: [GSOC 17] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-03-14 Thread DEV_OPS
Hi Mengxing Please read my comments : On 3/14/17 17:34, Mengxing Liu wrote: > I send this email to Tony, too. Because he promised to help me with testing > and benchmarking. > The worst problems have been seen with 32 or more cores on 4 or more sockets with a large number of

Re: [HACKERS] multivariate statistics (v25)

2017-03-14 Thread David Rowley
On 13 March 2017 at 23:00, David Rowley wrote: > > 0003: > > No more time today. Will try and get to those soon. > 0003: I've now read this patch. My main aim here was to learn what it does and how it works. I need to spend much longer understanding how your

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

2017-03-14 Thread Heikki Linnakangas
Looks straightforward at a quick read-through. I have just a couple of questions. How much of the performance gain comes from avoiding the FunctionCallInvoke overhead, by simply having SortSupport with a comparison function, and how much comes from the "abbreviation"? Also, is it worth the

Re: [HACKERS] scram and \password

2017-03-14 Thread Heikki Linnakangas
On 03/14/2017 04:47 AM, Tom Lane wrote: Robert Haas writes: I'm not talking about changing the default, just having it be possible to use \password with the new system as it was with the old, whatever exactly we think that means. Seems to me the intended behavior of

Re: [HACKERS] parallelize queries containing initplans

2017-03-14 Thread Amit Kapila
On Fri, Feb 10, 2017 at 4:34 PM, Amit Kapila wrote: > > I could see two possibilities to determine whether the plan (for which > we are going to generate an initplan) contains a reference to a > correlated var param node. One is to write a plan or path walker to >

Re: [HACKERS] Gather Merge

2017-03-14 Thread Rushabh Lathia
On Mon, Mar 13, 2017 at 10:56 PM, Robert Haas wrote: > On Fri, Mar 10, 2017 at 7:59 AM, Rushabh Lathia > wrote: > > Error coming from create_gather_merge_plan() from below condition: > > > > if (memcmp(sortColIdx, gm_plan->sortColIdx, > >

[HACKERS] Re: [GSOC 17] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-03-14 Thread Mengxing Liu
I send this email to Tony, too. Because he promised to help me with testing and benchmarking. > > >> The worst problems have been > >> seen with 32 or more cores on 4 or more sockets with a large number > >> of active connections. I don't know whether you have access to a > >> machine capable

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-14 Thread Tsunakawa, Takayuki
From: David Steele [mailto:da...@pgmasters.net] > >> 3.The default location of the SSL key file is $PGDATA, so the permission > of the key file is likely to become 0640. But the current postgres requires > it to be 0600. See src/backend/libpq/be-secure-openssl.c. > > > > Yes, that needs to be

Re: [HACKERS] exposing wait events for non-backends (was: Tracking wait event for latches)

2017-03-14 Thread Michael Paquier
On Fri, Mar 10, 2017 at 2:36 PM, Kuntal Ghosh wrote: > On Fri, Mar 10, 2017 at 3:11 AM, Andres Freund wrote: >> On 2017-03-09 16:37:29 -0500, Tom Lane wrote: >>> Robert Haas writes: >>> > On Thu, Mar 9, 2017 at 2:30 PM,

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-14 Thread Amit Langote
On 2017/03/13 19:30, Amit Langote wrote: >> Here is the updated patch. >> >> Since this patch proposes to avoid creating scan nodes for non-leaf tables >> in a partition tree, they won't be referenced anywhere in the resulting >> plan tree. So the executor will not lock those tables in the >>

Re: [HACKERS] increasing the default WAL segment size

2017-03-14 Thread tushar
On 03/14/2017 11:14 AM, Beena Emerson wrote: Hello, Attached is the updated patch. It fixes the issues and also updates few code comments. Can you please check with the new patch? Thanks, both issues has been fixed now. -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The

Re: [HACKERS] background sessions

2017-03-14 Thread Pavel Stehule
2017-03-13 21:22 GMT+01:00 Robert Haas : > On Sat, Mar 11, 2017 at 10:11 AM, Pavel Stehule > wrote: > > 2017-03-09 14:52 GMT+01:00 Peter Eisentraut > > : > >> > >> On 3/8/17 14:22, Pavel Stehule wrote: > >> > 1.

Re: [HACKERS] allow referring to functions without arguments when unique

2017-03-14 Thread Michael Paquier
On Fri, Mar 10, 2017 at 2:03 PM, Peter Eisentraut wrote: > On 3/7/17 00:32, Michael Paquier wrote: >>> @@ -7198,6 +7198,33 @@ function_with_argtypes: >>> n->objargs = extractArgTypes($2); >>> $$ = n; >>> }

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

2017-03-14 Thread Vaishnavi Prabakaran
On Tue, Mar 14, 2017 at 4:19 AM, Daniel Verite wrote: > > I mean the next iteration of the above while statement. Referring > to the doc, that would be the "next batch entry": > > " To get the result of the first batch entry the client must call >

[HACKERS] Re: [COMMITTERS] pgsql: Add test case for two phase commit. Also by Masahiko Sawada.

2017-03-14 Thread Michael Paquier
On Tue, Mar 14, 2017 at 5:04 AM, Michael Meskes wrote: > Add test case for two phase commit. Also by Masahiko Sawada. > > Branch > -- > master > > Details > --- > http://git.postgresql.org/pg/commitdiff/42fcad68a9c0e0ebecf6842888723cad1f9d5be2 > > Modified Files >

<    1   2