Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATE and DELETE

2017-02-04 Thread Rod Taylor
On Thu, Feb 2, 2017 at 11:40 AM, Alvaro Herrera wrote: > Pavel Stehule wrote: > > > Identification of unjoined tables should be very useful - but it is far > to > > original proposal - so it can be solved separately. > > > > This patch is simple - and usually we prefer

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

2017-02-04 Thread Fabien COELHO
Hello Corey, The check I was suggesting on whether Ctrl+C has been pressed on an empty line seems harder to implement, because get_interactive() just calls readline() or fgets(), which block to return when a whole line is ready. AFAICS psql can't know what was the edit-in-progress when these

Re: [HACKERS] PoC: Make it possible to disallow WHERE-less UPDATE and DELETE

2017-02-04 Thread Michael Paquier
On Sun, Feb 5, 2017 at 10:08 AM, Rod Taylor wrote: > A general SQL-Critic would be a very welcome extension. Please no hyphen for extension names! -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] Ignore tablespace ACLs when ignoring schema ACLs

2017-02-04 Thread Noah Misch
DefineIndex() has a check_rights argument that determines whether to perform a namespace ACL check. When ALTER TABLE ALTER TYPE rebuilds an index, it sets that flag. The theory goes that use of DROP INDEX and CREATE INDEX is a mere implementation detail of ALTER TABLE ALTER TYPE; the operation

Re: [HACKERS] Review: GIN non-intrusive vacuum of posting tree

2017-02-04 Thread Jeff Davis
On Sun, Jan 22, 2017 at 10:32 PM, Jeff Davis wrote: > On Sat, Jan 21, 2017 at 4:25 AM, Andrew Borodin wrote: > One idea I had that might be simpler is to use a two-stage page > delete. The first stage would remove the link from the parent and mark > the

Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY

2017-02-04 Thread Pavan Deolasee
On Sat, Feb 4, 2017 at 11:54 PM, Tom Lane wrote: > > Based on Pavan's comments, I think trying to force this into next week's > releases would be extremely unwise. If the bug went undetected this long, > it can wait for a fix for another three months. Yes, I think bug

[HACKERS] Variable name typo in launcher.c

2017-02-04 Thread Masahiko Sawada
Hi, I think "laucher" should be "launcher". Attached patch fixes it. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_typo_launcher_c.patch Description: Binary data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY

2017-02-04 Thread Pavan Deolasee
On Sat, Feb 4, 2017 at 12:10 PM, Amit Kapila wrote: > > > If we do above, then I think primary key attrs won't be returned > because for those we are using relation copy rather than an original > working copy of attrs. See code below: > > switch (attrKind) > { > .. >

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2017-02-04 Thread Masahiko Sawada
On Wed, Feb 1, 2017 at 11:55 PM, Claudio Freire wrote: > On Wed, Feb 1, 2017 at 6:13 PM, Masahiko Sawada wrote: >> On Wed, Feb 1, 2017 at 10:02 PM, Claudio Freire >> wrote: >>> On Wed, Feb 1, 2017 at 5:47 PM, Masahiko

Re: [HACKERS] pg_sequences bug ?

2017-02-04 Thread Michael Paquier
On Sat, Feb 4, 2017 at 2:50 PM, Shinoda, Noriyoshi wrote: > I tried a committed pg_sequences for PostgreSQL 10dev > (https://commitfest.postgresql.org/12/771/). > I found that when multiple users create SEQUENCE, I cannot see the > pg_sequences catalog. I think that

Re: [HACKERS] Constraint exclusion failed to prune partition in case of partition expression involves function call

2017-02-04 Thread amul sul
I see, thanks Amit. Regards, Amul Sent from a mobile device. Please excuse brevity and tpyos.

[HACKERS] pg_restore foreign keys NOT VALID, or [assume] VALID; VALIDATE CONSTRAINT CONCURRENTLY

2017-02-04 Thread Tomasz Ostrowski
Hi. A lot of time during pg_restore of a large database is spent on validating all the foreign keys. In contrast to importing data and creating indexes this operation does not parallelize well. So large percentage of parallel restore time ends up using single worker to validate foreign keys

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

2017-02-04 Thread Daniel Verite
Corey Huinker wrote: [about Ctrl-C] > That does seem to be the consensus desired behavior. I'm just not sure > where to handle that. The var "cancel_pressed" shows up in a lot of places. > Advice? Probably you don't need to care about cancel_pressed, and the /if stack could be unwound

Re: [HACKERS] Provide list of subscriptions and publications in psql's completion

2017-02-04 Thread Michael Paquier
On Fri, Feb 3, 2017 at 3:56 AM, Peter Eisentraut wrote: > On 2/2/17 12:48 AM, Michael Paquier wrote: >> +#define Query_for_list_of_subscriptions \ >> +" SELECT pg_catalog.quote_ident(subname) "\ >> +" FROM pg_catalog.pg_subscription "\ >> +" WHERE

[HACKERS] 3D Z-curve spatial index

2017-02-04 Thread Boris Muratshin
Hi hackers, The low-level implementation of 3D Z-curve index (https://github.com/bmuratshin/zcurve/tree/master) is getting close to GiST R-Tree performance at significantly lesser number of pages read from disk. See attached figures, times2 - average request execution time VS average points

Re: [HACKERS] pageinspect: Hash index support

2017-02-04 Thread Ashutosh Sharma
> As far as I can tell, the hash_bitmap_info() function is doing > something completely ridiculous. One would expect that the purpose of > this function was to tell you about the status of pages in the bitmap. > The documentation claims that this is what the function does: it > claims that this

Re: [HACKERS] pgbench more operators & functions

2017-02-04 Thread Fabien COELHO
Hello, For my 2c, at least, while I'm definitely interested in this, it's not nearly high enough on my plate with everything else going on to get any attention in the next few weeks, at least. I do think that, perhaps, this patch may deserve a bit of a break, to allow people to come back to

Re: [HACKERS] pageinspect: Hash index support

2017-02-04 Thread Ashutosh Sharma
On Sat, Jan 28, 2017 at 10:25 PM, Ashutosh Sharma wrote: > Hi, > > Please find my reply inline. > >> In hash_bimap_info(), we go to the trouble of creating a raw page but >> never do anything with it. I guess the idea here is just to error out >> if the supplied page

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

2017-02-04 Thread Corey Huinker
On Sat, Feb 4, 2017 at 11:53 AM, Corey Huinker wrote: > The check I was suggesting on whether Ctrl+C has been pressed >> on an empty line seems harder to implement, because get_interactive() >> just calls readline() or fgets(), which block to return when a whole >> line

[HACKERS] Ancient row-ordering instability in regression tests

2017-02-04 Thread Tom Lane
I noticed that skink failed today with a row-ordering difference: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink=2017-02-04%2009%3A40%3A01 Looking at the regression test operations that change table onek2, I think the blame has to fall on this sequence in the "misc" test:

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

2017-02-04 Thread Corey Huinker
> > I noticed that the "barking" is conditional to "success". ISTM that it > should always "bark" in interactive mode, whether success or not. > "success" in those cases means "the expression was a valid boolean", and non-success cases (should) result in an error being printed regardless of

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

2017-02-04 Thread Corey Huinker
> > The check I was suggesting on whether Ctrl+C has been pressed > on an empty line seems harder to implement, because get_interactive() > just calls readline() or fgets(), which block to return when a whole > line is ready. AFAICS psql can't know what was the edit-in-progress > when these

[HACKERS] Draft release notes for next week's releases are up for review

2017-02-04 Thread Tom Lane
First-draft release notes are available at https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9863017b87f3592ff663d03fc663a4f1f8fdb8b2 They should appear in a more readable form at https://www.postgresql.org/docs/devel/static/release-9-6-2.html after guaibasaurus' next buildfarm

Re: [HACKERS] Provide list of subscriptions and publications in psql's completion

2017-02-04 Thread Fujii Masao
On Fri, Feb 3, 2017 at 3:55 AM, Peter Eisentraut wrote: > On 2/2/17 12:48 PM, Fujii Masao wrote: >> +#define Query_for_list_of_subscriptions \ >> +" SELECT pg_catalog.quote_ident(subname) "\ >> +" FROM pg_catalog.pg_subscription "\ >> +" WHERE

Re: [HACKERS] Logical Replication and Character encoding

2017-02-04 Thread Petr Jelinek
On 01/02/17 04:05, Kyotaro HORIGUCHI wrote: > Hello, > > At Tue, 31 Jan 2017 12:46:18 +, "Shinoda, Noriyoshi" > wrote in > >> I tried a committed Logical Replication environment. I

Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY

2017-02-04 Thread Tom Lane
Alvaro Herrera writes: > I intend to commit this soon to all branches, to ensure it gets into the > next set of minors. Based on Pavan's comments, I think trying to force this into next week's releases would be extremely unwise. If the bug went undetected this long, it

Re: [HACKERS] PinBuffer() no longer makes use of strategy

2017-02-04 Thread Alexander Korotkov
On Sat, Feb 4, 2017 at 4:33 AM, Andres Freund wrote: > On 2017-02-03 19:13:45 -0600, Jim Nasby wrote: > > No, I noticed it while reading code. Removing that does mean that if any > > non-default strategy (in any backend) hits that buffer again then the > buffer > > will

Re: [HACKERS] Provide list of subscriptions and publications in psql's completion

2017-02-04 Thread Fujii Masao
On Sat, Feb 4, 2017 at 9:01 PM, Michael Paquier wrote: > On Fri, Feb 3, 2017 at 3:56 AM, Peter Eisentraut > wrote: >> On 2/2/17 12:48 AM, Michael Paquier wrote: >>> +#define Query_for_list_of_subscriptions \ >>> +" SELECT

Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION

2017-02-04 Thread Petr Jelinek
On 03/02/17 19:38, Fujii Masao wrote: > On Sat, Feb 4, 2017 at 12:49 AM, Fujii Masao wrote: >> On Fri, Feb 3, 2017 at 10:56 AM, Kyotaro HORIGUCHI >> wrote: >>> At Fri, 3 Feb 2017 01:02:47 +0900, Fujii Masao >>>