Re: [HACKERS] A little RLS oversight?

2015-07-26 Thread Dean Rasheed
On 25 July 2015 at 19:12, Joe Conway joe.con...@crunchydata.com wrote: On 07/22/2015 02:17 PM, Dean Rasheed wrote: Hmm, I think it probably ought to do more, based on whether or not RLS is being bypassed or in force-mode -- see the first few checks in get_row_security_policies(). Perhaps a new

Re: [HACKERS] checkpointer continuous flushing

2015-07-26 Thread Fabien COELHO
Hello, Attached is very minor v5 update which does a rebase completes the cleanup of doing a full sort instead of a chuncked sort. Attached is an updated version of the patch which turns the sort option into a boolean, and also include the sort time in the checkpoint log. There is still

Re: [HACKERS] Failing assertions in indxpath.c, placeholder.c and brin_minmax.c

2015-07-26 Thread Tom Lane
Andreas Seltenreich seltenre...@gmx.de writes: when running my random query generator contraption[1] against the regression database of 9.5 or master, it occasionally triggers one of the following three assertions. Very very cool tool! Please keep doing that testing. The first two seem to be

Re: [HACKERS] Improving replay of XLOG_BTREE_VACUUM records

2015-07-26 Thread Andres Freund
On 2015-07-24 09:53:49 +0300, Heikki Linnakangas wrote: On 05/02/2015 02:10 AM, Jim Nasby wrote: This looks like a good way to address this until the more significant work can be done. I'm not a fan of RBM_ZERO_NO_BM_VALID; how about RBM_ZERO_BM_INVALID? or BM_NOT_VALID? Or maybe I'm just

Re: [HACKERS] Restore-reliability mode

2015-07-26 Thread Noah Misch
On Thu, Jul 23, 2015 at 04:53:49PM -0300, Alvaro Herrera wrote: Peter Geoghegan wrote: On Sat, Jun 6, 2015 at 12:58 PM, Noah Misch n...@leadboat.com wrote: - Call VALGRIND_MAKE_MEM_NOACCESS() on a shared buffer when its local pin count falls to zero. Under CLOBBER_FREED_MEMORY,

Re: [HACKERS] GSets: Getting collation related error when GSets has text column

2015-07-26 Thread Andres Freund
Hi, On 2015-07-17 18:55:52 +0530, Jeevan Chalke wrote: Attached patch which attempts to fix this issue. However I am not sure whether it is correct. But it does not add any new issues as such. Added few test in the patch as well. Pushed the fix. Thanks for the report and fix. - Andres --

[HACKERS] Buildfarm failure from overly noisy warning message

2015-07-26 Thread Tom Lane
chipmunk failed last night http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=chipmunkdt=2015-07-26%2007%3A36%3A32 like so: == pgsql.build/src/test/regress/regression.diffs === ***

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-26 Thread Andres Freund
On 2015-07-17 19:57:22 +0100, Andrew Gierth wrote: Attached is the current version of my fix (with Jeevan's regression tests plus one of mine). Pushed, thanks for the report and fix! -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] CustomScan and readfuncs.c

2015-07-26 Thread Kouhei Kaigai
Hello, Under the investigation of ParallelAppend, I noticed here is a few problems in CustomScan, that prevents to reproduce an equivalent plan node on the background worker from serialized string. 1. CustomScanMethods-TextOutCustomScan callback

Re: [HACKERS] A little RLS oversight?

2015-07-26 Thread Joe Conway
On 07/26/2015 07:19 AM, Dean Rasheed wrote: I'm not convinced about exporting convert_table_name() from acl.c, particularly with such a non-descriptive name. It's only a couple of lines of code, so I think they may as well just be included directly in the new function, as seems to be common

Re: [HACKERS] Buildfarm failure from overly noisy warning message

2015-07-26 Thread Andres Freund
Hi, On 2015-07-26 10:56:05 -0400, Tom Lane wrote: CREATE INDEX tenk2_unique1 ON tenk2 USING btree(unique1 int4_ops); + WARNING: could not send signal to process 30123: No such process What's evidently happened here is that our session tried to boot an autovacuum process off a table lock,

Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug

2015-07-26 Thread Andres Freund
On 2015-07-17 11:37:26 +0530, Jeevan Chalke wrote: However I wonder why we are supporting GROUPING SETS inside GROUPING SETS. On Oracle, it is throwing an error. We are not trying to be Oracle compatible, but just curious to know. The SQL specification seems to be pretty unambigous about

Re: [HACKERS] extend pgbench expressions with functions

2015-07-26 Thread Fabien COELHO
Hello Heikki, As soon as we add more functions, the way they are documented needs to be reworked too; we'll need to add a table in the manual to list them. Here is a v8 with abs, min, max, random, gaussian et exponential. [...] There is no real doc, WIP... Here is a v9 with a doc. The

Re: [HACKERS] Gsets: ROW expression semantic broken between 9.4 and 9.5

2015-07-26 Thread Andrew Gierth
Jeevan == Jeevan Chalke jeevan.cha...@enterprisedb.com writes: Jeevan Hi Jeevan It looks like we have broken the ROW expression without Jeevan explicit ROW keyword in GROUP BY. Andres has given the short version, but here's the long version: In the spec, GROUP BY ROW(a,b) is an error, while

Re: [HACKERS] Sharing aggregate states between different aggregate functions

2015-07-26 Thread Heikki Linnakangas
On 07/09/2015 12:44 PM, David Rowley wrote: On 15 June 2015 at 12:05, David Rowley david.row...@2ndquadrant.com wrote: This basically allows an aggregate's state to be shared between other aggregate functions when both aggregate's transition functions (and a few other things) match There's

Re: [HACKERS] Combining Aggregates

2015-07-26 Thread Heikki Linnakangas
On 04/01/2015 06:28 PM, Robert Haas wrote: On Mon, Mar 30, 2015 at 1:28 AM, Michael Paquier michael.paqu...@gmail.com wrote: I've been thinking of bumping this patch to the June commitfest as the patch only exists to provide the basic infrastructure for things like parallel aggregation,

[HACKERS] Failing assertions in indxpath.c, placeholder.c and brin_minmax.c

2015-07-26 Thread Andreas Seltenreich
Hi, when running my random query generator contraption[1] against the regression database of 9.5 or master, it occasionally triggers one of the following three assertions. Someone more knowledgeable might want to take a look at them... -- FailedAssertion(!(outer_rel-rows 0), File: indxpath.c,

Re: [HACKERS] GSets: Fix bug involving GROUPING and HAVING together

2015-07-26 Thread Andres Freund
On 2015-07-24 11:34:22 +0100, Andrew Gierth wrote: Andrew == Andrew Gierth and...@tao11.riddles.org.uk writes: Andrew The other is that in subquery_planner, the optimization of Andrew converting HAVING clauses to WHERE clauses is suppressed if Andrew parse-groupingSets isn't empty. (It

Re: [HACKERS] CustomScan and readfuncs.c

2015-07-26 Thread Tom Lane
Kouhei Kaigai kai...@ak.jp.nec.com writes: Under the investigation of ParallelAppend, I noticed here is a few problems in CustomScan, that prevents to reproduce an equivalent plan node on the background worker from serialized string. 1. CustomScanMethods-TextOutCustomScan callback

Re: [HACKERS] GSets: Fix bug involving GROUPING and HAVING together

2015-07-26 Thread Andres Freund
On 2015-07-14 14:51:09 +0530, Jeevan Chalke wrote: Fix this by adding GroupingFunc node in this walker. We do it correctly in contain_aggs_of_level_walker() in which we have handling for GroupingFunc there. Attached patch to fix this. Pushed, thanks for fix! -- Sent via pgsql-hackers

Re: [HACKERS] Buildfarm failure from overly noisy warning message

2015-07-26 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 07/26/2015 11:00 AM, Andres Freund wrote: On 2015-07-26 10:56:05 -0400, Tom Lane wrote: I'm inclined to reduce the WARNING to LOG Hm, that doesn't seem like a very nice solution, given that LOG is even more likely to end up in the server log.

Re: [HACKERS] anole: assorted stability problems

2015-07-26 Thread Andres Freund
On 2015-07-07 13:25:24 +0200, Andres Freund wrote: So, it's starting to look good. Not exactly allowing for a lot of confidence yet, but still: http://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=anolebr=HEAD Since there have not been any relevant failures since, I'm going to remove

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-26 Thread Noah Misch
On Thu, Jul 23, 2015 at 12:14:14PM -0400, Robert Haas wrote: On Wed, Jul 22, 2015 at 3:42 PM, Adam Brightwell adam.brightw...@crunchydatasolutions.com wrote: I like Noah's proposal of having pg_dump --create reproduce all database-level state. Should it be enabled by default? If so,

[HACKERS] False comment about speculative insertion

2015-07-26 Thread Peter Geoghegan
Attached patch removes a reference to an executor README section about speculative insertion. In fact, the high-level overview of speculative insertion ended up at the top of execIndexing.c. The executor README was not touched by the ON CONFLICT patch at all. I don't think it's necessary to refer

Re: [HACKERS] security labels on databases are bad for dump restore

2015-07-26 Thread Craig Ringer
On 20 July 2015 at 01:18, Noah Misch n...@leadboat.com wrote: On Wed, Jul 15, 2015 at 11:08:53AM +0200, Andres Freund wrote: On 2015-07-15 12:04:40 +0300, Alvaro Herrera wrote: Andres Freund wrote: One thing worth mentioning is that arguably the problem is caused by the fact that we're

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-07-26 Thread Amit Kapila
On Sat, Jul 25, 2015 at 10:30 PM, Ildus Kurbangaliev i.kurbangal...@postgrespro.ru wrote: On Jul 24, 2015, at 10:02 PM, Robert Haas robertmh...@gmail.com wrote: Also, the patch should not invent a new array similar but not quite identical to LockTagTypeNames[]. This is goofy: +

Re: [HACKERS] Combining Aggregates

2015-07-26 Thread David Rowley
On 27 July 2015 at 04:58, Heikki Linnakangas hlinn...@iki.fi wrote: On 04/01/2015 06:28 PM, Robert Haas wrote: On Mon, Mar 30, 2015 at 1:28 AM, Michael Paquier michael.paqu...@gmail.com wrote: I've been thinking of bumping this patch to the June commitfest as the patch only exists to

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2015-07-26 Thread Kyotaro HORIGUCHI
Hello, Attatched is the revised version of this patch. The first patch is not changed from before. The second is fixed a kind of bug. Ths third is the new one to allow backslash continuation for backslash commands. Ah, thanks:-) Would you consider adding the patch to the

Re: [HACKERS] Failing assertions in indxpath.c, placeholder.c and brin_minmax.c

2015-07-26 Thread Tom Lane
Andreas Seltenreich seltenre...@gmx.de writes: when running my random query generator contraption[1] against the regression database of 9.5 or master, it occasionally triggers one of the following three assertions. I've fixed the first two of these --- thanks for the report! ,[ git

Re: [HACKERS] Failing assertions in indxpath.c, placeholder.c and brin_minmax.c

2015-07-26 Thread Peter Geoghegan
On Sun, Jul 26, 2015 at 7:07 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andreas Seltenreich seltenre...@gmx.de writes: when running my random query generator contraption[1] against the regression database of 9.5 or master, it occasionally triggers one of the following three assertions. Very very

Re: [HACKERS] Combining Aggregates

2015-07-26 Thread Kouhei Kaigai
On 04/01/2015 06:28 PM, Robert Haas wrote: On Mon, Mar 30, 2015 at 1:28 AM, Michael Paquier michael.paqu...@gmail.com wrote: I've been thinking of bumping this patch to the June commitfest as the patch only exists to provide the basic infrastructure for things like parallel aggregation,

Re: [HACKERS] New functions

2015-07-26 Thread Michael Paquier
On Wed, Jul 8, 2015 at 10:18 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Jul 8, 2015 at 9:15 PM, Дмитрий Воронин carriingfat...@yandex.ru wrote: 07.07.2015, 18:34, Michael Paquier michael.paqu...@gmail.com: Speaking of which, I have rewritten the patch as attached.

Re: [HACKERS] spgist recovery assertion failure

2015-07-26 Thread Michael Paquier
On Mon, Jul 27, 2015 at 2:00 PM, Noah Misch n...@leadboat.com wrote: When I caused a crash during the create_index regression test, recovery hit an assertion failure. Minimal test case: psql -X EOSQL CREATE TABLE t (c text); INSERT INTO t SELECT 'P0123456789abcdef' FROM

Re: [HACKERS] Combining Aggregates

2015-07-26 Thread David Rowley
On 27 July 2015 at 12:14, Kouhei Kaigai kai...@ak.jp.nec.com wrote: The main use case people have been talking about is parallel query, but is there some other case this would be useful right now, without the parallel query feature? You and Simon talked about this case: 2. Queries such

[HACKERS] Documentation tweak for row-valued expressions and null

2015-07-26 Thread Thomas Munro
Hi I wonder if it might be worth adding a tiny note to the manual to point out that the special logic for row-valued-expression IS [ NOT ] NULL doesn't apply anywhere else that we handle nulls or talk about [non]-null values in the manual. See attached. -- Thomas Munro

[HACKERS] spgist recovery assertion failure

2015-07-26 Thread Noah Misch
When I caused a crash during the create_index regression test, recovery hit an assertion failure. Minimal test case: psql -X EOSQL CREATE TABLE t (c text); INSERT INTO t SELECT 'P0123456789abcdef' FROM generate_series(1,1000); INSERT INTO t VALUES ('P0123456789abcdefF'); CREATE INDEX ON t USING

Re: [HACKERS] CustomScan and readfuncs.c

2015-07-26 Thread Kouhei Kaigai
Kouhei Kaigai kai...@ak.jp.nec.com writes: Under the investigation of ParallelAppend, I noticed here is a few problems in CustomScan, that prevents to reproduce an equivalent plan node on the background worker from serialized string. 1. CustomScanMethods-TextOutCustomScan callback

Re: [HACKERS] Failing assertions in indxpath.c, placeholder.c and brin_minmax.c

2015-07-26 Thread Michael Paquier
On Sun, Jul 26, 2015 at 10:32 PM, Andreas Seltenreich seltenre...@gmx.de wrote: Michael Paquier writes: Footnotes: [1] https://github.com/anse1/sqlsmith This is really interesting stuff. I think that it would be possible to extract self-contained test cases from your tool and those

Re: [HACKERS] raw output from copy

2015-07-26 Thread Craig Ringer
On 7 July 2015 at 14:32, Pavel Stehule pavel.steh...@gmail.com wrote: Hi previous patch was broken, and buggy Here is new version with fixed upload and more tests I routinely see people trying to use COPY ... FORMAT binary to export a single binary field (like an image, for example) and

Re: [HACKERS] Parallel Seq Scan

2015-07-26 Thread Haribabu Kommi
On Thu, Jul 23, 2015 at 9:42 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jul 22, 2015 at 9:14 PM, Robert Haas robertmh...@gmail.com wrote: One thing I noticed that is a bit dismaying is that we don't get a lot of benefit from having more workers. Look at the 0.1 data. At 2

Re: [HACKERS] spgist recovery assertion failure

2015-07-26 Thread Noah Misch
On Mon, Jul 27, 2015 at 02:19:09PM +0900, Michael Paquier wrote: On Mon, Jul 27, 2015 at 2:00 PM, Noah Misch n...@leadboat.com wrote: When I caused a crash during the create_index regression test, recovery hit an assertion failure. Minimal test case: psql -X EOSQL CREATE TABLE t (c

Re: [HACKERS] LWLock deadlock and gdb advice

2015-07-26 Thread Amit Langote
On 2015-07-16 PM 04:03, Jeff Janes wrote: On Wed, Jul 15, 2015 at 8:44 AM, Heikki Linnakangas hlinn...@iki.fi wrote: Both. Here's the patch. Previously, LWLockAcquireWithVar set the variable associated with the lock atomically with acquiring it. Before the lwlock-scalability changes, that

Re: [HACKERS] Sharing aggregate states between different aggregate functions

2015-07-26 Thread David Rowley
On 27 July 2015 at 03:24, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/09/2015 12:44 PM, David Rowley wrote: On 15 June 2015 at 12:05, David Rowley david.row...@2ndquadrant.com wrote: This basically allows an aggregate's state to be shared between other aggregate functions when both

Re: [HACKERS] Buildfarm failure from overly noisy warning message

2015-07-26 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: + WARNING: could not send signal to process 30123: No such process What's evidently happened here is that our session tried to boot an autovacuum process off a table lock, only that process was gone by the time we issued the kill() call. I'm inclined to

Re: [HACKERS] more RLS oversights

2015-07-26 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/03/2015 10:03 AM, Noah Misch wrote: (2) CreatePolicy() and AlterPolicy() omit to create a pg_shdepend entry for each role in the TO clause. Test case: Please see the attached patch. Note that I used SHARED_DEPENDENCY_ACL for this. It seems