Re: [HACKERS] Changing references of password encryption to hashing

2017-03-13 Thread Michael Paquier
On Sun, Mar 12, 2017 at 7:51 AM, Joe Conway wrote: > On 03/09/2017 06:16 PM, Michael Paquier wrote: >> As discussed here: >> https://www.postgresql.org/message-id/98cafcd0-5557-0bdf-4837-0f2b7782d...@joeconway.com >> We are using in documentation and code comments "encryption" to define >> what ac

Re: [HACKERS] Relation cache invalidation on replica

2017-03-13 Thread Andres Freund
On March 12, 2017 11:22:22 PM PDT, Victor Yegorov wrote: >2016-02-28 11:53 GMT+02:00 Simon Riggs : > >> We have various proposals for fixing this, so on consideration here's >what >> I think we should do... >> >> 1. Ignore my first patch to always set an xid. Andres thought that >this >> may bre

Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2]

2017-03-13 Thread Jeevan Chalke
Hi, I have reviewed this patch further and here are my comments: 1. Will it be better to use compare_pathkeys() instead of equal(root->query_pathkeys, pathkeys)? 2. I think it will be good if we add a simple test-case in postgres_fdw.sql which shows that LIMIT is passed to remote server. We migh

[HACKERS] Typo in snapbuild.c

2017-03-13 Thread Masahiko Sawada
Hi, Attached fixes comment typos in snapbuild.c file. Regards, -- Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_small_typo_in_snapbuild.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgres

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

2017-03-13 Thread Rafia Sabih
On Thu, Mar 9, 2017 at 5:28 PM, Thomas Munro wrote: > On Wed, Mar 8, 2017 at 12:58 PM, Andres Freund wrote: > > 0002: Check hash join work_mem usage at the point of chunk allocation. > > > > Modify the existing hash join code to detect work_mem exhaustion at > > the point where chunks are alloca

Re: [HACKERS] increasing the default WAL segment size

2017-03-13 Thread Prabhat Sahu
Hi, 2)Getting "Aborted (core dumped)" error at the time of running pg_basebackup , *(this issue is only coming on Linux32 ,not on Linux64)* we have double check to confirm it . Steps to reproduce on Linux32 > === >> fetch the sources >> apply both the patches >> ./configure

Re: [HACKERS] increasing the default WAL segment size

2017-03-13 Thread Beena Emerson
Hello, On Mon, Mar 13, 2017 at 1:49 PM, Prabhat Sahu wrote: > Hi, > > 2)Getting "Aborted (core dumped)" error at the time of running > pg_basebackup , *(this issue is only coming on Linux32 ,not on Linux64)* > we have double check to confirm it . > > Steps to reproduce on Linux32 > >> ==

Re: [HACKERS] Changing references of password encryption to hashing

2017-03-13 Thread Craig Ringer
On 12 March 2017 at 06:51, Joe Conway wrote: > My opinion is that the user visible aspects of this should be deprecated > and correct syntax provided. But perhaps that is overkill. FWIW, in my experience, pretty much nobody understands the pretty tangled behaviour of "WITH [ENCRYPTED] PASSWORD",

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

2017-03-13 Thread Artur Zakirov
On 15.02.2017 20:54, Anastasia Lubennikova wrote: Done. I have gotten the error that AlterUserMappingStmt doesn't have if_not_exists (in Russian): gram.y: В функции «base_yyparse»: gram.y:4918:7: ошибка: «AlterUserMappingStmt {aka struct AlterUserMappingStmt}» не содержит элемента с имен

Re: [HACKERS] BRIN cost estimate

2017-03-13 Thread Emre Hasegeli
> Will Emre be around to make the required changes to the patch? I see > it's been a while since it was originally posted. I am around. I can post an update in a few days. Thank you for picking this up. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to y

Re: [HACKERS] Parallel Append implementation

2017-03-13 Thread Amit Khandekar
On 10 March 2017 at 22:08, Robert Haas wrote: > On Fri, Mar 10, 2017 at 12:17 AM, Amit Khandekar > wrote: >> I agree that the two-lists approach will consume less memory than >> bitmapset. Keeping two lists will effectively have an extra pointer >> field which will add up to the AppendPath size,

Re: [HACKERS] Parallel Append implementation

2017-03-13 Thread Amit Khandekar
On 12 March 2017 at 19:31, Tels wrote: > Moin, > > On Sat, March 11, 2017 11:29 pm, Robert Haas wrote: >> On Fri, Mar 10, 2017 at 6:01 AM, Tels >> wrote: >>> Just a question for me to understand the implementation details vs. the >>> strategy: >>> >>> Have you considered how the scheduling decisi

Re: [HACKERS] make check-world output

2017-03-13 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > For the basic build process, we've largely solved that through the > use of "make -s". But we don't really have a comparable "be quiet" > option for test runs, especially not the TAP tests. Maybe we need > to think a bit more globally about what it is we're trying ton > accom

Re: [HACKERS] multivariate statistics (v25)

2017-03-13 Thread David Rowley
On 3 March 2017 at 03:53, Tomas Vondra wrote: > This time with the attachments It's been a long while since I looked at this patch, but I'm now taking another look. I've made a list of stuff I've found from making my first pass on 0001 and 0002. Some of the stuff may seem a little pedanti

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

2017-03-13 Thread Anastasia Lubennikova
13.03.2017 11:53, Artur Zakirov: On 15.02.2017 20:54, Anastasia Lubennikova wrote: Done. I have gotten the error that AlterUserMappingStmt doesn't have if_not_exists (in Russian): gram.y: В функции «base_yyparse»: gram.y:4918:7: ошибка: «AlterUserMappingStmt {aka struct AlterUserMapping

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-13 Thread Amit Langote
On 2017/03/10 17:57, Amit Langote wrote: > On 2017/03/08 22:36, Robert Haas wrote: >> On Wed, Mar 8, 2017 at 5:36 AM, Amit Langote wrote: -rel = mtstate->resultRelInfo->ri_RelationDesc; +nominalRTE = rt_fetch(node->nominalRelation, estate->es_range_table); +nominalRel = h

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-13 Thread Amit Langote
On 2017/03/13 19:24, Amit Langote wrote: > On 2017/03/10 17:57, Amit Langote wrote: >> On 2017/03/08 22:36, Robert Haas wrote: >>> On Wed, Mar 8, 2017 at 5:36 AM, Amit Langote wrote: > -rel = mtstate->resultRelInfo->ri_RelationDesc; > +nominalRTE = rt_fetch(node->nominalRelation, es

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-13 Thread Oleg Bartunov
On Mon, Mar 13, 2017 at 9:24 AM, Nico Williams wrote: > On Thu, Mar 09, 2017 at 07:12:07PM +0100, Sven R. Kunze wrote: > > From my day-to-day work I can tell, the date(time) type is the only > missing > > piece of JSON to make it perfect for business applications (besides, > maybe, > > a "currenc

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

2017-03-13 Thread Artur Zakirov
On 13.03.2017 13:01, Anastasia Lubennikova wrote: Thanks for catching that. It was caused by a conflict on applying of the patch. Updated versions of both patches are attached. I think the code is good and the patches are small. Documentation is updated by the patches. All regression tests

Re: [HACKERS] Typo in snapbuild.c

2017-03-13 Thread Magnus Hagander
On Mon, Mar 13, 2017 at 8:33 AM, Masahiko Sawada wrote: > Hi, > > Attached fixes comment typos in snapbuild.c file. > Applied, thanks. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/

Re: [HACKERS] Parallel Append implementation

2017-03-13 Thread Robert Haas
On Mon, Mar 13, 2017 at 4:59 AM, Amit Khandekar wrote: > I agree that we should preferably have the non-partial plans started > first. But I am not sure if it is really worth ordering the partial > plans by cost. The reason we ended up not keeping track of the > per-subplan parallel_worker, is bec

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-13 Thread Rafia Sabih
On Wed, Mar 8, 2017 at 1:54 AM, Robert Haas wrote: > There are two places where we currently set CURSOR_OPT_PARALLEL_OK in > PL/pgsql: exec_stmt_return_query() sets it when calling > exec_dynquery_with_params(), and exec_run_select() calls it when > calling exec_prepare_plan() if parallelOK is se

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-13 Thread Amit Kapila
On Thu, Mar 9, 2017 at 3:11 AM, Robert Haas wrote: > On Tue, Mar 7, 2017 at 6:41 PM, Robert Haas wrote: Great, thanks. 0001 looks good to me now, so committed. >>> >>> Committed 0002. >> >> Here are some initial review thoughts on 0003 based on a first read-through. > > More thoughts on the

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-13 Thread Amit Kapila
On Sun, Mar 12, 2017 at 8:06 AM, Robert Haas wrote: > On Sat, Mar 11, 2017 at 12:20 AM, Amit Kapila wrote: >>> /* >>> + * Change the shared buffer state in critical section, >>> + * otherwise any error could make it unrecoverable after >>> +

Re: [HACKERS] New CORRESPONDING clause design

2017-03-13 Thread Surafel Temesgen
On Sat, Mar 11, 2017 at 9:01 AM, Pavel Stehule wrote: > I am sending minor update - cleaning formatting and white spaces, error > messages + few more tests > Thank you very much for your help > Maybe correspondingClause needs own node type with attached location. Then > context can be much be

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-03-13 Thread Mithun Cy
Hi all, thanks for the feedback. Based on your recent comments I have implemented a new patch which is attached below, On Sun, Feb 26, 2017 at 10:16 PM, Robert Haas wrote: > This is not easy to fix. The lock has to be taken based on the > relation OID, not the relfilenode, but we don't have the

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-03-13 Thread Mithun Cy
>> - The error handling loop around load_block() suggests that you're >> expecting some reads to fail, which I guess is because you could be >> trying to read blocks from a relation that's been rewritten under a >> different relfilenode, or partially or entirely truncated. But I >> don't think it'

Re: [HACKERS] New CORRESPONDING clause design

2017-03-13 Thread Pavel Stehule
2017-03-13 14:13 GMT+01:00 Surafel Temesgen : > > > On Sat, Mar 11, 2017 at 9:01 AM, Pavel Stehule > wrote: > > >> I am sending minor update - cleaning formatting and white spaces, error >> messages + few more tests >> > > Thank you very much for your help > > >> Maybe correspondingClause needs o

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

2017-03-13 Thread Robert Haas
On Fri, Mar 10, 2017 at 4:32 PM, Tom Lane wrote: > Improve postmaster's logging of listen socket creation. > > When one of the kernel calls in the socket()/bind()/listen() sequence > fails, include the specific address we're trying to bind to in the log > message. This greatly eases debugging of

Re: [HACKERS] Parallel Append implementation

2017-03-13 Thread Robert Haas
On Mon, Mar 13, 2017 at 7:46 AM, Robert Haas wrote: > On Mon, Mar 13, 2017 at 4:59 AM, Amit Khandekar > wrote: >> I agree that we should preferably have the non-partial plans started >> first. But I am not sure if it is really worth ordering the partial >> plans by cost. The reason we ended up n

Re: [HACKERS] Parallel seq. plan is not coming against inheritance or partition table

2017-03-13 Thread Amit Kapila
On Wed, Mar 8, 2017 at 6:58 PM, Robert Haas wrote: > On Wed, Mar 8, 2017 at 7:04 AM, Amit Kapila wrote: >> On Wed, Mar 8, 2017 at 8:28 AM, Robert Haas wrote: >>> On Tue, Mar 7, 2017 at 9:24 PM, Amit Kapila wrote: I think it can give us benefit in such cases as well (especially when we

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

2017-03-13 Thread Tom Lane
Robert Haas writes: > So now on every startup I get this: > 2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv6 address "::1" > 2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv4 address > "127.0.0.1" > 2017-03-13 10:08:49.400 EDT [90059] LOG: listening on Unix address > "/tmp/

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-13 Thread David Steele
Hi Aleksander, On 2/22/17 9:43 AM, Fabien COELHO wrote: > > Hello Aleksander, > >> ``` >> xloginsert.c:742:18: warning: implicit conversion from 'int' to 'char' >> changes value from 253 to -3 [-Wconstant-conversion] >> ``` > > There is a bunch of these in "xlog.c" as well, and the same code is

Re: [HACKERS] WAL Consistency checking for hash indexes

2017-03-13 Thread Ashutosh Sharma
Couple of review comments,, You may also need to update the documentation as now we are also going to support wal consistency check for hash index. The current documentation does not include hash index. +only records originating from those resource managers. Currently, +the suppo

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2017-03-13 Thread David Steele
Hello, On 3/1/17 9:38 PM, Kyotaro HORIGUCHI wrote: > At Tue, 28 Feb 2017 10:39:01 -0500, Stephen Frost wrote > in <20170228153901.gh9...@tamriel.snowman.net> >> * David Fetter (da...@fetter.org) wrote: >>> On Mon, Feb 27, 2017 at 11:53:17PM -0500, Stephen Frost wrote: * Kyotaro HORIGUCHI (

Re: [HACKERS] \h tab-completion

2017-03-13 Thread David Steele
Hi Andreas, On 3/1/17 8:47 AM, Peter Eisentraut wrote: > On 2/3/17 07:12, Andreas Karlsson wrote: >> On 01/25/2017 07:13 AM, Michael Paquier wrote: >>> What I think you should do is making the code path of >>> \\h smarter with some exceptions by using TailMatchesCS2() for ALTER. >>> There is as we

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

2017-03-13 Thread Kevin Grittner
On Sat, Mar 11, 2017 at 8:39 PM, Mengxing Liu wrote: >> 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 of putting this kind of stress on it (perhaps at >> y

Re: [HACKERS] [PATCH] ALTER DEFAULT PRIVILEGES with GRANT/REVOKE ON SCHEMAS

2017-03-13 Thread David Steele
Hi Matheus, On 3/2/17 8:27 AM, David Steele wrote: > On 1/18/17 7:18 PM, Petr Jelinek wrote: >> >> The patch looks good, the only thing I am missing is tab completion >> support for psql. > > It looks like this patch is still waiting on an update for tab > completion in psql. > > Do you know whe

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

2017-03-13 Thread Tom Lane
I wrote: > IIRC, I objected to putting knowledge of ConditionalStack > into the shared psqlscan.l lexer, and I still think that would be a bad > idea; but we need some way to get the lexer to shut that off. Probably > the best way is to add a passthrough "void *" argument that would let the > get_

Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument

2017-03-13 Thread David Steele
Hi Peter, On 3/2/17 9:43 AM, David Steele wrote: > Peter, > > On 2/1/17 12:59 AM, Michael Paquier wrote: >> On Thu, Jan 26, 2017 at 8:16 AM, Tom Lane wrote: >>> [ in the service of closing out this thread... ] >>> >>> Peter Geoghegan writes: Finally, 0003-* is a Valgrind suppression borrow

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

2017-03-13 Thread Alvaro Herrera
Tom Lane wrote: > Robert Haas writes: > > So now on every startup I get this: > > > 2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv6 address "::1" > > 2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv4 address > > "127.0.0.1" > > 2017-03-13 10:08:49.400 EDT [90059] LOG: list

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

2017-03-13 Thread Tom Lane
Alvaro Herrera writes: > I think it's good to have it, but I would argue that it should be a > single line that lists all the addresses instead. I don't think that's a terribly good idea, for the reasons I mentioned in https://www.postgresql.org/message-id/12776.1489160501%40sss.pgh.pa.us

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-13 Thread Aleksander Alekseev
Hi David, Thank you for reminding about this patch! Here is a new patch. I tried to make as little changes as possible. This is no doubt not the most beautiful patch on Earth but it removes all warnings. I anyone could suggest an approach that would be significantly better please don't hesitate t

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

2017-03-13 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Tom Lane wrote: > > Robert Haas writes: > > > So now on every startup I get this: > > > > > 2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv6 address "::1" > > > 2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv4 address > >

Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional

2017-03-13 Thread David Steele
Hi Robert, On 3/6/17 12:48 PM, Robert Haas wrote: > On Sat, Mar 4, 2017 at 9:12 AM, David Steele wrote: >> Yes, that makes sense. Attached are two patches as requested: >> >> 01 - Just marks pg_stop_backup() variants as parallel restricted >> 02 - Add the wait_for_archive param to pg_stop_backup

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

2017-03-13 Thread Corey Huinker
> > > Barring objection I'll push this so that Corey can rebase over it. > > regards, tom lane > Seems straightforward, and I appreciate you doing it for me!

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread David Steele
On 3/10/17 8:12 AM, Stephen Frost wrote: > Peter, > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> On 2/28/17 20:58, David Steele wrote: >>> This patch introduces a new initdb param, -u/-file-mode-mask, and a new >>> GUC, file_mode_mask, to allow the default mode of files and di

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread David Steele
On 3/10/17 8:34 AM, Stephen Frost wrote: > Greetings, > > * Tsunakawa, Takayuki (tsunakawa.ta...@jp.fujitsu.com) wrote: >> From: pgsql-hackers-ow...@postgresql.org >>> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of David Steele >>> PostgreSQL currently requires the file mode mask (umask)

Re: [HACKERS] scram and \password

2017-03-13 Thread Jeff Janes
On Fri, Mar 10, 2017 at 2:43 PM, Michael Paquier wrote: > On Sat, Mar 11, 2017 at 2:53 AM, Jeff Janes wrote: > > Should the \password tool in psql inspect password_encryption and act on > it > > being 'scram'? > > Not sure if it is wise to change the default fot this release. > I'm not proposin

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-13 Thread Konstantin Knizhnik
On 13.03.2017 11:03, Andres Freund wrote: Hi, On 2017-03-12 05:40:51 +0100, Tomas Vondra wrote: I wanted to do a bit of testing and benchmarking on this, but 0004 seems to be a bit broken. Well, "broken" in the sense that it's already outdated, because other stuff that got merged. The pat

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread Tom Lane
David Steele writes: > At miscinit.c:893: > /* We can treat the EPERM-error case as okay because that error implies > that the existing process has a different userid than we do, which means > it cannot be a competing postmaster. A postmaster cannot successfully > attach to a data directory owne

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread Tom Lane
... oh, and now that I've actually looked at the patch, I think it's a seriously bad idea to proceed by removing the mode parameter to PathNameOpenFile et al. That's basically doubling down on an assumption that there are NO places in the backend, and never will be any, in which we want to create

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

2017-03-13 Thread Daniel Verite
Vaishnavi Prabakaran wrote: > > while (QbatchQueueProcess(conn)) { > >r = PQsetSingleRowMode(conn); > >if (r!=1) { > > fprintf(stderr, "PQsetSingleRowMode() failed"); > >} > >.. > Thanks for investigating the problem, and could you kindly exp

Re: [HACKERS] Gather Merge

2017-03-13 Thread Robert Haas
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, >numsortkeys * sizeof(AttrNumber)) != 0) > elog(ERROR, "GatherMerge child's targetlist doesn't mat

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread David Steele
Hi Tom, On 3/13/17 1:13 PM, Tom Lane wrote: > ... oh, and now that I've actually looked at the patch, I think it's > a seriously bad idea to proceed by removing the mode parameter to > PathNameOpenFile et al. That's basically doubling down on an assumption > that there are NO places in the backen

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread David Steele
Hi Tom, On 3/13/17 1:03 PM, Tom Lane wrote: > David Steele writes: >> At miscinit.c:893: > >> /* We can treat the EPERM-error case as okay because that error implies >> that the existing process has a different userid than we do, which means >> it cannot be a competing postmaster. A postmaster

[HACKERS] Bogus tab completion tweak for UPDATE ... SET ... =

2017-03-13 Thread Thomas Munro
Hi, Even though the following is coincidentally meaningful, I don't think it was intentional or is useful: postgres=# update foo set x = DEFAULT Shouldn't that completion should be suppressed, like in the attached? -- Thomas Munro http://www.enterprisedb.com fix-update-set-completion.patch D

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread Tom Lane
David Steele writes: > On 3/13/17 1:03 PM, Tom Lane wrote: >> TBH, the fact that we're relying on 0600 mode for considerations such >> as these makes me tremendously afraid of this whole patch. I think that >> the claimed advantages are not anywhere near worth the risk that somebody >> is going t

Re: [HACKERS] Bogus tab completion tweak for UPDATE ... SET ... =

2017-03-13 Thread Tom Lane
Thomas Munro writes: > Even though the following is coincidentally meaningful, I don't think > it was intentional or is useful: > postgres=# update foo set x = DEFAULT Uh, seems perfectly sane to me. Why should we assume that can't be what the user wants? regards, tom l

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

2017-03-13 Thread Tomas Vondra
On 03/13/2017 06:49 AM, Ashutosh Sharma wrote: Hi, I had a look into this patch and would like to share some of my review comments that requires author's attention. 1) The comment for page_checksum() needs to be corrected. It seems like it has been copied from page_header and not edited it furt

Re: [HACKERS] Radix tree for character conversion

2017-03-13 Thread Heikki Linnakangas
On 03/06/2017 10:16 AM, Kyotaro HORIGUCHI wrote: At Fri, 3 Mar 2017 12:53:04 +0900, Michael Paquier wrote in On Thu, Mar 2, 2017 at 2:20 PM, Kyotaro HORIGUCHI wrote: 5) Just remove plain map files and all related code. Addition to that, Makefile stores hash digest of authority files in

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread David Steele
On 3/13/17 2:16 PM, Tom Lane wrote: > David Steele writes: >> On 3/13/17 1:03 PM, Tom Lane wrote: >>> TBH, the fact that we're relying on 0600 mode for considerations such >>> as these makes me tremendously afraid of this whole patch. I think that >>> the claimed advantages are not anywhere near

Re: [HACKERS] Performance improvement for joins where outer side is unique

2017-03-13 Thread Tom Lane
[ getting back to this patch finally... ] David Rowley writes: > I've attached a patch which implements this, though only for > MergeJoin, else I'd imagine we'd also need to ensure all proofs used > for testing the uniqueness were also hash-able too. I added some XXX > comments in analyzejoin.c a

Re: [HACKERS] delta relations in AFTER triggers

2017-03-13 Thread Kevin Grittner
On Sun, Mar 12, 2017 at 4:08 PM, Thomas Munro wrote: > I found a new way to break it: run the trigger function so > that the plan is cached by plpgsql, then ALTER TABLE incompatibly, > then run the trigger function again. See attached. The first part doesn't seem so bad. Using the transition t

Re: [HACKERS] Radix tree for character conversion

2017-03-13 Thread Tom Lane
Heikki Linnakangas writes: > I did some more kibitzing here and there, and committed. Thanks everyone! 111 files changed, 147742 insertions(+), 367346 deletions(-) Nice. > It would be nice to run the map_checker tool one more time, though, to > verify that the mappings match those from Postgre

Re: [HACKERS] PATCH: Configurable file mode mask

2017-03-13 Thread Tom Lane
David Steele writes: > On 3/13/17 2:16 PM, Tom Lane wrote: >> I also don't especially want to have to analyze cases like "what >> happens if user initdb'd with mask X but then changes the GUC and >> restarts the postmaster?". Maybe the right thing is to not expose >> this as a GUC at all, but dri

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

2017-03-13 Thread Thomas Munro
On Mon, Mar 13, 2017 at 8:40 PM, Rafia Sabih wrote: > In an attempt to test v7 of this patch on TPC-H 20 scale factor I found a > few regressions, > Q21: 52 secs on HEAD and 400 secs with this patch Thanks Rafia. Robert just pointed out off-list that there is a bogus 0 row estimate in here: ->

Re: [HACKERS] Radix tree for character conversion

2017-03-13 Thread Heikki Linnakangas
On 03/13/2017 08:53 PM, Tom Lane wrote: Heikki Linnakangas writes: It would be nice to run the map_checker tool one more time, though, to verify that the mappings match those from PostgreSQL 9.6. +1 Just to be sure, and after that the map checker can go to the dustbin. Hm, maybe we should

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-13 Thread Sven R. Kunze
On 10.03.2017 20:28, Josh Berkus wrote: On 03/09/2017 10:12 AM, Sven R. Kunze wrote: SaltStack uses YAML for their tools, too. I personally can empathize with them (as a user of configuration management) about this as writing JSON would be nightmare with all the quoting, commas, curly braces et

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

2017-03-13 Thread Daniel Verite
Tom Lane wrote: > when we see \if is that we do nothing but absorb text > until we see the matching \endif. At that point we could bitch and throw > everything away if, say, there's \elif after \else, or anything else you > want to regard as a "compile time error". Otherwise we start exe

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-13 Thread Sven R. Kunze
On 13.03.2017 07:24, Nico Williams wrote: On Thu, Mar 09, 2017 at 07:12:07PM +0100, Sven R. Kunze wrote: From my day-to-day work I can tell, the date(time) type is the only missing piece of JSON to make it perfect for business applications (besides, maybe, a "currency" type). And a binary type

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

2017-03-13 Thread Robert Haas
On Fri, Mar 10, 2017 at 5:43 AM, Ashutosh Bapat wrote: > PFA the zip containing all the patches rebased on > 56018bf26eec1a0b4bf20303c98065a8eb1b0c5d and contain the patch to free > memory consumed by paths using a separate path context. Some very high-level thoughts based on a look through these

Re: [HACKERS] delta relations in AFTER triggers

2017-03-13 Thread Alvaro Herrera
Kevin Grittner wrote: > >> What is necessary to indicate an additional SQL feature covered? > > > > I assume you're talking about information_schema.sql_features > > I had forgotten we had that in a table. I was thinking more of the docs: > > https://www.postgresql.org/docs/current/static/featu

Re: [HACKERS] [COMMITTERS] pgsql: Add amcheck extension to contrib.

2017-03-13 Thread Tom Lane
Andres Freund writes: > Add amcheck extension to contrib. axolotl just failed on this: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=axolotl&dt=2017-03-13%2017%3A49%3A24 *** *** 78,86 -- make sure we don't have any leftover locks SELECT * FROM pg_locks WHERE rel

Re: [HACKERS] Should buffer of initialization fork have a BM_PERMANENT flag

2017-03-13 Thread Robert Haas
On Wed, Jan 25, 2017 at 7:14 PM, Michael Paquier wrote: > (Adding Robert in CC.) > > On Thu, Jan 26, 2017 at 4:34 AM, Wang Hao wrote: >> An unlogged table has an initialization fork. The initialization fork does >> not have an BM_PERMANENT flag when get a buffer. >> In checkpoint (not shutdown or

Re: [HACKERS] Two phase commit in ECPG

2017-03-13 Thread Michael Meskes
> Previous 002 patch lacked to add describing PREPARE TRANSACTION. > Attached updated 002 patch. I just committed both patches and a backport of the bug fix itself. Thanks again for finding and fixing. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)

Re: [HACKERS] background sessions

2017-03-13 Thread 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. will be background session process closed automatically when parent >> > process is closed? >> >> If the communications queue goes away the p

Re: [HACKERS] ANALYZE command progress checker

2017-03-13 Thread Robert Haas
On Fri, Mar 10, 2017 at 2:57 PM, Jim Nasby wrote: > Oh, I wasn't suggesting a single SRF for everything. Hopefully users will > eventually figure out a good formula to drive a "progress bar" for each type > of monitor, which is what you really want anyway (at least 99% of the time). > If we got th

Re: [HACKERS] Allow pg_dumpall to work without pg_authid

2017-03-13 Thread Peter Eisentraut
Why this? + if (no_role_passwords && binary_upgrade) + { + fprintf(stderr, _("%s: options --no-role-passwords and --binary-upgrade cannot be used together\n"), + progname); + fprintf(stderr, _("Try \"%s --help\" for more informa

Re: [HACKERS] make check-world output

2017-03-13 Thread Jeff Janes
On Fri, Mar 10, 2017 at 6:19 PM, Tom Lane wrote: > Alvaro Herrera writes: > > Jeff Janes wrote: > >> There was some recent discussion about making "make check-world" faster. > >> I'm all for that, but how about making it quieter? On both machines > I've > >> run it on (CentOS6.8 and Ubuntu 16.0

[HACKERS] Silence perl warning in check-world

2017-03-13 Thread Jeff Janes
In some older versions of perl (like v5.10), I get a warning that: Use of implicit split to @_ is deprecated at src/test/recovery/t/ 006_logical_decoding.pl line 26. Splitting into a dummy variable silences that warning, as in the attached. There may be a better way to silence the warning. (Pres

Re: [HACKERS] [COMMITTERS] pgsql: Add amcheck extension to contrib.

2017-03-13 Thread Andres Freund
Hi, On 2017-03-13 15:45:01 -0400, Tom Lane wrote: > I could be wrong, but the most obvious explanation for this failure is > that autovacuum had a lock on the table or index when we looked. > Even if that isn't why axolotl failed in this particular case, I think > it's dead certain that we will se

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

2017-03-13 Thread Tom Lane
Corey Huinker writes: >> Barring objection I'll push this so that Corey can rebase over it. > Seems straightforward, and I appreciate you doing it for me! Hearing no objections, pushed. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql

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

2017-03-13 Thread Tom Lane
"Daniel Verite" writes: > Tom Lane wrote: >> when we see \if is that we do nothing but absorb text >> until we see the matching \endif. At that point we could bitch and throw >> everything away if, say, there's \elif after \else, or anything else you >> want to regard as a "compile time error".

Re: [HACKERS] asynchronous execution

2017-03-13 Thread Corey Huinker
On Mon, Mar 13, 2017 at 1:06 AM, Corey Huinker wrote: > >> I think it will, because Append itself has been made async-capable by one >> of the patches and UNION ALL uses Append. But as mentioned above, only >> the postgres_fdw foreign tables will be able to utilize this for now. >> >> > Ok, I'll

Re: [HACKERS] WIP: Faster Expression Processing v4

2017-03-13 Thread Tomas Vondra
On 03/13/2017 09:03 AM, Andres Freund wrote: Hi, On 2017-03-12 05:40:51 +0100, Tomas Vondra wrote: I wanted to do a bit of testing and benchmarking on this, but 0004 seems to be a bit broken. Well, "broken" in the sense that it's already outdated, because other stuff that got merged. Yes,

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

2017-03-13 Thread Robert Haas
On Sat, Mar 11, 2017 at 1:32 AM, Craig Ringer wrote: > On 11 March 2017 at 05:09, Robert Haas wrote: >> On the other >> hand, there really are two separate notions of the "oldest" XID. >> There's the oldest XID that we can safely look up, and then there's >> the oldest XID that we can't reuse. T

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

2017-03-13 Thread Tom Lane
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 >> on. Lukas probably realizes that there are no guarantees that the >> query text that appears in pg_stat_statement

Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument

2017-03-13 Thread Peter Geoghegan
On Mon, Mar 13, 2017 at 8:23 AM, David Steele wrote: > It's been a while since there was a new patch or any activity on this > thread. > > If you need more time to produce a patch, please post an explanation for > the delay and a schedule for the new patch. If no patch or explanation > is is post

Re: [HACKERS] Performance improvement for joins where outer side is unique

2017-03-13 Thread David Rowley
On 14 March 2017 at 07:50, Tom Lane wrote: > [ getting back to this patch finally... ] > > David Rowley writes: > > I've attached a patch which implements this, though only for > > MergeJoin, else I'd imagine we'd also need to ensure all proofs used > > for testing the uniqueness were also hash-

Re: [HACKERS] bytea_output vs make installcheck

2017-03-13 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 9, 2017 at 6:45 PM, Neha Khatri wrote: >> With this, if an installcheck is done, that might also have been done with >> the expectation that the output will be in 'escape' format. In that case, >> how much is it justified to hard code the format for regression da

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-13 Thread Andrew Dunstan
On 03/13/2017 12:35 AM, Tom Lane wrote: > Andres Freund writes: >> On 2017-03-11 22:14:07 -0500, Tom Lane wrote: >>> This looks generally sane to me, although I'm not very happy about folding >>> the "$(MKDIR_P) output_iso" call into pg_isolation_regress_check --- that >>> seems weird and unlike

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-13 Thread Andrew Dunstan
On 03/13/2017 07:21 PM, Andrew Dunstan wrote: > > On 03/13/2017 12:35 AM, Tom Lane wrote: >> Andres Freund writes: >>> On 2017-03-11 22:14:07 -0500, Tom Lane wrote: This looks generally sane to me, although I'm not very happy about folding the "$(MKDIR_P) output_iso" call into pg_isola

Re: [HACKERS] Measuring replay lag

2017-03-13 Thread Thomas Munro
Hi, Please see separate replies to Simon and Craig below. On Sun, Mar 5, 2017 at 8:38 PM, Simon Riggs wrote: > On 1 March 2017 at 10:47, Thomas Munro wrote: >> I do see why a new user trying this feature for the first time might >> expect it to show a lag of 0 just as soon as sent LSN = >> writ

Re: [HACKERS] Radix tree for character conversion

2017-03-13 Thread Michael Paquier
On Tue, Mar 14, 2017 at 4:07 AM, Heikki Linnakangas wrote: > On 03/13/2017 08:53 PM, Tom Lane wrote: >> Heikki Linnakangas writes: >>> >>> It would be nice to run the map_checker tool one more time, though, to >>> verify that the mappings match those from PostgreSQL 9.6. >> >> +1 Nice to login a

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

2017-03-13 Thread Robert Haas
On Mon, Mar 13, 2017 at 3:24 PM, Robert Haas wrote: > Haven't looked at 0007 yet. + if (rel->part_scheme) + { + int cnt_parts; + + for (cnt_parts = 0; cnt_parts < nparts; cnt_parts++) + { +

Re: [HACKERS] asynchronous execution

2017-03-13 Thread Amit Langote
On 2017/03/14 6:31, Corey Huinker wrote: > On Mon, Mar 13, 2017 at 1:06 AM, Corey Huinker > wrote: > >> >>> I think it will, because Append itself has been made async-capable by one >>> of the patches and UNION ALL uses Append. But as mentioned above, only >>> the postgres_fdw foreign tables wil

Re: [HACKERS] \h tab-completion

2017-03-13 Thread Andreas Karlsson
On 03/13/2017 03:56 PM, David Steele wrote: Do you know when you will have a new patch available for review that incorporates Peter's request? I believe I will find the time to finish it some time in a couple of days. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.

Re: [HACKERS] tuplesort_gettuple_common() and *should_free argument

2017-03-13 Thread Peter Geoghegan
On Wed, Jan 25, 2017 at 3:16 PM, Tom Lane wrote: > Um, I didn't find it all that self-explanatory. Why wouldn't we want > to avoid writing undefined data? For roughly the same reason we'd want to avoid it in existing cases that are next to the proposed new suppression. We happen to not need to i

Re: [HACKERS] Should buffer of initialization fork have a BM_PERMANENT flag

2017-03-13 Thread Michael Paquier
On Tue, Mar 14, 2017 at 4:46 AM, Robert Haas wrote: > On Wed, Jan 25, 2017 at 7:14 PM, Michael Paquier > wrote: >> (Adding Robert in CC.) >> >> On Thu, Jan 26, 2017 at 4:34 AM, Wang Hao wrote: >>> An unlogged table has an initialization fork. The initialization fork does >>> not have an BM_PERMA

  1   2   >