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 wrote: > > > - Call VALGRIND_MAKE_MEM_NOACCESS() on a shared buffer when its local > > > pin > > > count falls to zero. Under CLOBBER_FREED_MEMORY, wipe

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

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 mayb

[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

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 9:55 PM, Andreas Seltenreich wrote: > 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.

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

2015-07-26 Thread Andreas Seltenreich
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 queries to > reproduce the failures. It is written that this tools connects to a >

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

2015-07-26 Thread Tom Lane
Andreas Seltenreich 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 planner problem

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 sup

Re: [HACKERS] A little RLS oversight?

2015-07-26 Thread Dean Rasheed
On 25 July 2015 at 19:12, Joe Conway 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 SQL-callable functi

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

[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=chipmunk&dt=2015-07-26%2007%3A36%3A32 like so: == pgsql.build/src/test/regress/regression.diffs === *** /home/pgbfarm/buildroot/REL9_3_STABLE/pgsql.build/src/test/regress/expected/c

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 loc

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] Gsets: ROW expression semantic broken between 9.4 and 9.5

2015-07-26 Thread Andrew Gierth
> "Jeevan" == Jeevan Chalke 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 GROUP BY (a,b) is ex

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:

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

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 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 is empty if t

Re: [HACKERS] CustomScan and readfuncs.c

2015-07-26 Thread Tom Lane
Kouhei Kaigai 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: 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 --

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

2015-07-26 Thread Andrew Dunstan
On 07/26/2015 11:00 AM, Andres Freund wrote: 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 b

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 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 quite a number of aggregates in

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=anole&br=HEAD Since there have not been any relevant failures since, I'm going to remove

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

2015-07-26 Thread Tom Lane
Andrew Dunstan 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. >>> and/or 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 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, aggregate before join, and perhap

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

2015-07-26 Thread Kevin Grittner
Tom Lane 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 reduce the WAR

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 > wrote: > >> I like Noah's proposal of having pg_dump --create reproduce all > >> database-level state. > > > > Should it be enabled by default? If so, then wouldn't it make more > >

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

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

2015-07-26 Thread Tom Lane
Kevin Grittner writes: > Tom Lane wrote: >> 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 think a LOG entry when an autovacuum process is actually canceled > has

Re: [HACKERS] MultiXact member wraparound protections are now enabled

2015-07-26 Thread Noah Misch
On Fri, Jul 24, 2015 at 09:14:09PM -0400, Peter Eisentraut wrote: > On 7/22/15 4:45 PM, Robert Haas wrote: > > But it seemed to me that this could be rather confusing. I thought it > > would be better to be explicit about whether the protections are > > enabled in all cases. That way, (1) if you

[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] Failing assertions in indxpath.c, placeholder.c and brin_minmax.c

2015-07-26 Thread Tom Lane
Andreas Seltenreich 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 bisect ] > | first

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 wrote: > Andreas Seltenreich 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 doi

Re: [HACKERS] CustomScan and readfuncs.c

2015-07-26 Thread Kouhei Kaigai
> Kouhei Kaigai 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] 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 > > 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, aggregat

[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 " 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 http://www.enterprisedb.com note-about-row

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

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 wrote: > > > > Also, the patch should not invent a new array similar but not quite > > identical to LockTagTypeNames[]. > > > > This is goofy: > > > > +

Re: [HACKERS] New functions

2015-07-26 Thread Michael Paquier
On Wed, Jul 8, 2015 at 10:18 PM, Michael Paquier wrote: > > On Wed, Jul 8, 2015 at 9:15 PM, Дмитрий Воронин > wrote: > > > > > > 07.07.2015, 18:34, "Michael Paquier" : > > > >> Speaking of which, I have rewritten the patch as attached. This looks > >> way cleaner than the previous version submi

Re: [HACKERS] Combining Aggregates

2015-07-26 Thread David Rowley
On 27 July 2015 at 04:58, Heikki Linnakangas wrote: > On 04/01/2015 06:28 PM, Robert Haas wrote: > >> On Mon, Mar 30, 2015 at 1:28 AM, Michael Paquier >> wrote: >> >>> I've been thinking of bumping this patch to the June commitfest as the patch only exists to provide the basic infrastructur

Re: [HACKERS] Combining Aggregates

2015-07-26 Thread David Rowley
On 27 July 2015 at 12:14, Kouhei Kaigai 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 as: > > >

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

Re: [HACKERS] raw output from copy

2015-07-26 Thread Craig Ringer
On 7 July 2015 at 14:32, Pavel Stehule 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 getting confused by the

Re: [HACKERS] Parallel Seq Scan

2015-07-26 Thread Haribabu Kommi
On Thu, Jul 23, 2015 at 9:42 PM, Amit Kapila wrote: > On Wed, Jul 22, 2015 at 9:14 PM, Robert Haas 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 >> workers, if we scaled perfectly, we would

[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

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 t

Re: [HACKERS] spgist recovery assertion failure

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

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 wrote: > > When I caused a crash during the create_index regression test, recovery hit > > an > > assertion failure. Minimal test case: > > > > psql -X < > CREATE TABLE t (c text); > >

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

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

2015-07-26 Thread David Rowley
On 27 July 2015 at 03:24, Heikki Linnakangas wrote: > On 07/09/2015 12:44 PM, David Rowley wrote: > >> On 15 June 2015 at 12:05, David Rowley >> wrote: >> >> >>> This basically allows an aggregate's state to be shared between other >>> aggregate functions when both aggregate's transition functio

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

2015-07-26 Thread Andreas Seltenreich
Tom Lane writes: > Andreas Seltenreich 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! I let s

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

2015-07-26 Thread Haribabu Kommi
On Thu, Jul 9, 2015 at 7:44 PM, David Rowley wrote: > On 15 June 2015 at 12:05, David Rowley 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 quite a