Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Amit Langote
Just realized something... On 2018/07/03 15:29, Amit Langote wrote: > Sorry for jumping in late here. I have a comment on the patch. > > + /* if there are no partitions then treat this as non-inheritance case. > */ > + if (partdesc->nparts == 0) > + { > + parentrte->inh

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 03:29:36PM +0900, Amit Langote wrote: > Why is this not near the beginning of expand_partitioned_rtentry()? > > Also, ISTM, this code would be unreachable because > expand_inherited_rtentry would not call here if the above if statement is > true, no? FWIW, I understood tha

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Amit Langote
On 2018/07/03 15:16, David Rowley wrote: > On 3 July 2018 at 18:11, Michael Paquier wrote: >> On Tue, Jul 03, 2018 at 06:00:46PM +1200, David Rowley wrote: >>> I think it should be backpatched to v11 and v10. Your original commit >>> went there too. I don't see any reason to do any different here

Re: Possible bug in logical replication.

2018-07-02 Thread Arseny Sher
Michael Paquier writes: > On Thu, Jun 21, 2018 at 07:31:20PM +0900, Michael Paquier wrote: >> Could it be possible to get a patch from all the feedback and exchange >> gathered here? Petr, I think that it would not hurt if you use the set >> of words and comments you think is most adapted as t

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread David Rowley
On 3 July 2018 at 18:11, Michael Paquier wrote: > On Tue, Jul 03, 2018 at 06:00:46PM +1200, David Rowley wrote: >> I think it should be backpatched to v11 and v10. Your original commit >> went there too. I don't see any reason to do any different here than >> what you did with the original commit.

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 06:00:46PM +1200, David Rowley wrote: > Thanks for fixing it up. It looks fine apart from "Temporation" should > be "Temporary". Of course, thanks. > I think it should be backpatched to v11 and v10. Your original commit > went there too. I don't see any reason to do any di

Re: Should contrib modules install .h files?

2018-07-02 Thread Pavel Stehule
2018-07-03 6:43 GMT+02:00 Craig Ringer : > On 2 July 2018 at 02:23, Andrew Gierth > wrote: > >> So I have this immediate problem: a PGXS build of a module, specifically >> an hstore transform for a non-core PL, is much harder than it should be >> because it has no way to get at hstore.h since tha

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread David Rowley
On 3 July 2018 at 16:55, Michael Paquier wrote: > Okay, the patch looks logically correct to me, I just tweaked the > comments as per the attached. I would also back-patch that down to v11 > to keep the code consistent with HEAD.. What do you think? Thanks for fixing it up. It looks fine apart

Re: Possible bug in logical replication.

2018-07-02 Thread Alvaro Herrera
On 2018-Jul-03, Michael Paquier wrote: > On Thu, Jun 21, 2018 at 07:31:20PM +0900, Michael Paquier wrote: > > Could it be possible to get a patch from all the feedback and exchange > > gathered here? Petr, I think that it would not hurt if you use the set > > of words and comments you think is mo

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 12:59:33PM +1200, David Rowley wrote: > On 3 July 2018 at 10:16, Michael Paquier wrote: >> On Mon, Jul 02, 2018 at 02:07:37PM -0400, Robert Haas wrote: >>> I'd rather keep an elog(ERROR) than completely remove the check. >> >> +1. > > Attached Okay, the patch looks logical

Re: Should contrib modules install .h files?

2018-07-02 Thread Craig Ringer
On 2 July 2018 at 02:23, Andrew Gierth wrote: > So I have this immediate problem: a PGXS build of a module, specifically > an hstore transform for a non-core PL, is much harder than it should be > because it has no way to get at hstore.h since that file is never > installed anywhere. > > Should t

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-07-02 Thread Ashutosh Bapat
On Tue, Jul 3, 2018 at 8:19 AM, Robert Haas wrote: > On Mon, Jul 2, 2018 at 1:46 AM, Ashutosh Bapat > wrote: >> This constraint was added to the partitioned table and inherited from >> there. If user wants to drop that constraint for some reason, this >> error message doesn't help. The error mess

Re: Possible bug in logical replication.

2018-07-02 Thread Michael Paquier
On Thu, Jun 21, 2018 at 07:31:20PM +0900, Michael Paquier wrote: > Could it be possible to get a patch from all the feedback and exchange > gathered here? Petr, I think that it would not hurt if you use the set > of words and comments you think is most adapted as the primary author of > the featur

Re: Copy function for logical replication slots

2018-07-02 Thread Michael Paquier
On Mon, Jul 02, 2018 at 04:31:32PM +0900, Masahiko Sawada wrote: > Attached an updated patch including copy function support for logical > slots as well as physical slots. Please review it. I had a look at this patch. As the output plugin can be changed for logical slots, having two functions is

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-07-02 Thread Amit Langote
On 2018/07/03 11:49, Robert Haas wrote: > On Mon, Jul 2, 2018 at 1:46 AM, Ashutosh Bapat > wrote: >> This constraint was added to the partitioned table and inherited from >> there. If user wants to drop that constraint for some reason, this >> error message doesn't help. The error message tells wh

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 1:46 AM, Ashutosh Bapat wrote: > This constraint was added to the partitioned table and inherited from > there. If user wants to drop that constraint for some reason, this > error message doesn't help. The error message tells why he can't drop > it, but doesn't tell, directl

Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 10:33 PM, Robert Haas wrote: > Yes, the original proposal was that we should be relaxed about it. ...in both directions i.e. DROP TABLE would work on a VIEW and DROP VIEW on a table. That definitely seems like it's going too far. > Another possibility that would also seem

Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 5:25 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Jun 26, 2018 at 1:06 PM, Tom Lane wrote: >>> Certainly we *could* change it, but it's not at all clear that it's a good >>> idea. The current behavior seemed sensible when it was implemented, and >>> it has stood f

Re: Speedup of relation deletes during recovery

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 04:13:15AM +0900, Fujii Masao wrote: > OK, so what about the attached patch? I have been looking at this patch, and this looks in good shape to me (please indent!). +* Call smgrclose() in reverse order as when smgropen() is called. +* This trick enables remove_from

Re: automatic restore point

2018-07-02 Thread Jaime Casanova
On Mon, 2 Jul 2018 at 20:07, Yotsunaga, Naoki wrote: > > Hi. Thanks for comments. > > Explanation of the background of the function proposal was inadequate. > So, I explain again. > > I assume the following situation. > User needs to make a quick, seemingly simple fix to an important production >

Re: Protect syscache from bloating with negative cache entries

2018-07-02 Thread Andres Freund
Hi, On 2018-07-02 21:50:36 -0400, Alvaro Herrera wrote: > On 2018-Jul-02, Andrew Dunstan wrote: > > > Andres suggested back in March (and again privately to me) that given how > > much this has changed from the original this CF item should be marked > > Returned With Feedback and the current patc

Re: Protect syscache from bloating with negative cache entries

2018-07-02 Thread Alvaro Herrera
On 2018-Jul-02, Andrew Dunstan wrote: > Andres suggested back in March (and again privately to me) that given how > much this has changed from the original this CF item should be marked > Returned With Feedback and the current patchset submitted as a new item. > > Does anyone object to that cours

Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data

2018-07-02 Thread Michael Paquier
On Mon, Jul 02, 2018 at 03:11:46PM -0700, Carter Thaxton wrote: > Also, there may be some misunderstanding about "foo:bar" above. That's an > example of using a namespaced table, where "bar" is a table in the > namespace "foo". Normally, assuming your table is named "bar" in the > default namespa

Re: Old small commitfest items

2018-07-02 Thread Michael Paquier
On Mon, Jul 02, 2018 at 10:30:11AM -0400, Andrew Dunstan wrote: > 528 1146 Fix the optimization to skip WAL-logging on table created in > same transaction This has been around for an astonishing amount of time... I don't recall all the details but rewriting most of the relation sync handling arou

Re: automatic restore point

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 01:06:31AM +, Yotsunaga, Naoki wrote: >> I'd rather spend effort making the initial execution of said commands >> less likely. > > I think that the function to prohibit DELETE and UPDATE without a > WHERE clause in the later response is good way. This has popped up alre

Re: automatic restore point

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 01:07:41AM +, Yotsunaga, Naoki wrote: >> There is also recovery_target_lsn which is new as of v10. > In this method, it is necessary to look at a lsn position before operating. > But I assume the user who did not look it before operating. > So I think that this method

RE: automatic restore point

2018-07-02 Thread Yotsunaga, Naoki
Hi. Thanks for comments. >There is also recovery_target_lsn which is new as of v10. In this method, it is necessary to look at a lsn position before operating. But I assume the user who did not look it before operating. So I think that this method is not appropriate. > So basically what you ar

RE: automatic restore point

2018-07-02 Thread Yotsunaga, Naoki
Hi. Thanks for comments. Explanation of the background of the function proposal was inadequate. So, I explain again. I assume the following situation. User needs to make a quick, seemingly simple fix to an important production database. User composes the query, gives it an once-over, and lets it

Re: Protect syscache from bloating with negative cache entries

2018-07-02 Thread Kyotaro HORIGUCHI
Hello. The previous v4 patchset was just broken. At Tue, 26 Jun 2018 18:00:03 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20180626.180003.127457941.horiguchi.kyot...@lab.ntt.co.jp> > Hello. I rebased this patchset. .. > > The attached is the patch set including this plancache stuff

Re: How to find the base version cf-bot is using?

2018-07-02 Thread Kyotaro HORIGUCHI
Hello. Thomas. At Mon, 2 Jul 2018 22:14:42 +1200, Thomas Munro wrote in > On Mon, Jul 2, 2018 at 9:39 PM, Kyotaro HORIGUCHI > wrote: > >> === applying patch > >> ./v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch > > ... > >> |Date: Tue, 26 Dec 2017 17:43:09 +0900 > > ... >

Re: Protect syscache from bloating with negative cache entries

2018-07-02 Thread Andrew Dunstan
On 06/26/2018 05:00 AM, Kyotaro HORIGUCHI wrote: The attached is the patch set including this plancache stuff. 0001- catcache time-based expiration (The origin of this thread) 0002- introduces dynahash pruning feature 0003- implement relcache pruning using 0002 0004- (perhaps) independent f

Re: Threat models for DB cryptography (Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key) Management Service (KMS)

2018-07-02 Thread Nico Williams
On Mon, Jul 02, 2018 at 06:22:46PM +0900, Masahiko Sawada wrote: > On Fri, Jun 22, 2018 at 2:31 PM, Tsunakawa, Takayuki > wrote: > > From: Nico Williams [mailto:n...@cryptonector.com] > > > >> One shortcoming of relying on OS functionality for protection against > >> malicious storage is that not

Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints

2018-07-02 Thread Nico Williams
On Tue, Jun 26, 2018 at 04:54:13PM -0400, Robbie Harwood wrote: > Nico Williams writes: > > > [Re-send; first attempt appears to have hit /dev/null somewhere. My > > apologies if you get two copies.] > > > > I've finally gotten around to rebasing this patch and making the change > > that was req

Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2018-07-02 Thread Nico Williams
On Mon, Jul 02, 2018 at 06:56:34PM +0300, Alvaro Hernandez wrote: > On 21/06/18 21:43, Nico Williams wrote: > >Incidentally, PG w/ pgcrypto and FDW does provide everything one needs > >to be able to implement client-side crypto: > > > > - use PG w/ FDW as a client-side proxy for the real DB > > -

Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data

2018-07-02 Thread Carter Thaxton
The whole reason for the colon in the --where option is to indicate which table the WHERE clause should refer to, so that one can dump less than all of the rows. The --table option is totally different. It specifies which tables to dump at all. If I provide a --where option, and no --table option

Re: [HACKERS] Small improvement to compactify_tuples

2018-07-02 Thread Andrew Dunstan
On 03/04/2018 04:57 AM, Yura Sokolov wrote: BTW, I have small change to templated version that improves sorting of random tuples a bit (1-1.5%). Will post it a bit later with test. There doesn't seem to have been any progress since this email. cheers andrew -- Andrew Dunstan

Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS

2018-07-02 Thread Tom Lane
Robert Haas writes: > On Tue, Jun 26, 2018 at 1:06 PM, Tom Lane wrote: >> Certainly we *could* change it, but it's not at all clear that it's a good >> idea. The current behavior seemed sensible when it was implemented, and >> it has stood for quite some years now. Now, we have one person >> co

Re: Avoid extra Sort nodes between WindowAggs when sorting can be reused

2018-07-02 Thread Daniel Gustafsson
> On 2 Jul 2018, at 14:01, Masahiko Sawada wrote: > Thank you for updating the patch! There are two review comments. Thanks for reviewing! > The current select_active_windows() function compares the all fields > of WindowClause for the sorting but with this patch we compare only > tleSortGroupR

Re: Should contrib modules install .h files?

2018-07-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> Might as well follow the MODULEDIR precedent (though I'm not wedded Tom> to that if somebody has an argument for something else). [...] Tom> I'd definitely vote for "error". Likewise if any .h file listed in Tom> the macro doesn't exist. OK, so that mat

Re: Should contrib modules install .h files?

2018-07-02 Thread Tom Lane
Andrew Gierth writes: > Two questions arise: > 1) include/server has a lot of files and subdirs, so using >include/server/$(MODULE)/ looks likely to be error-prone. So it >should be something like include/server/contrib/$(MODULE)/ or >include/server/extension/$(MODULE)/. Which one, or

Re: Should contrib modules install .h files?

2018-07-02 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: Andrew> OK, I'm working on an updated patch and here it is. This installs to $(includedir_server)/$(MODULEDIR)/$MODULE/file.h (e.g. include/server/extension/hstore/hstore.h for an actual example), and errors if HEADERS_xxx is defined for anything that's

Re: [WIP] [B-Tree] Retail IndexTuple deletion

2018-07-02 Thread Peter Geoghegan
On Mon, Jul 2, 2018 at 9:28 AM, Peter Geoghegan wrote: >> Execution time of last "VACUUM test;" command on my notebook was: >> >> with bulk deletion: 1.6 s; >> with Quick Vacuum Strategy: 5.2 s; >> with Quick Vacuum Strategy & TID sorting: 0.6 s. > > I'm glad that you looked into this. You could m

Re: Speedup of relation deletes during recovery

2018-07-02 Thread Fujii Masao
On Thu, Jun 28, 2018 at 3:23 AM, Andres Freund wrote: > On 2018-06-28 03:21:51 +0900, Fujii Masao wrote: >> On Wed, Jun 27, 2018 at 10:44 AM, Thomas Munro >> wrote: >> > On Wed, Jun 27, 2018 at 1:13 PM, Thomas Munro >> > wrote: >> >> On Wed, Jun 27, 2018 at 12:16 PM, Thomas Munro >> >> wrote: >

Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2018-07-02 Thread Alvaro Hernandez
On 11/06/18 12:22, Masahiko Sawada wrote: On Fri, May 25, 2018 at 8:41 PM, Moon, Insung wrote: Hello Hackers, This propose a way to develop "Table-level" Transparent Data Encryption (TDE) and Key Management Service (KMS) support in PostgreSQL. Issues on data encryption of PostgreSQL

Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2018-07-02 Thread Alvaro Hernandez
On 21/06/18 21:43, Nico Williams wrote: On Fri, May 25, 2018 at 08:41:46PM +0900, Moon, Insung wrote: Issues on data encryption of PostgreSQL == Currently, in PostgreSQL, data encryption can be using pgcrypto Tool. However, it is inconvenient to use pgcrypto to encrypts data in some c

Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS

2018-07-02 Thread Robert Haas
On Tue, Jun 26, 2018 at 1:06 PM, Tom Lane wrote: > Certainly we *could* change it, but it's not at all clear that it's a good > idea. The current behavior seemed sensible when it was implemented, and > it has stood for quite some years now. Now, we have one person > complaining that it wasn't wh

Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data

2018-07-02 Thread Robert Haas
On Fri, Jun 29, 2018 at 8:09 AM, Surafel Temesgen wrote: > hey, > i am reviewing this patch > On Thu, May 31, 2018 at 4:49 AM, Carter Thaxton > wrote: >> >> >> pg_dump --where '"foo:bar":created_at >= '2018-05-01'" dbname > > it would be more sqlish if it specified like: > --table=foo --where =

Re: shared-memory based stats collector

2018-07-02 Thread Robert Haas
On Fri, Jun 29, 2018 at 4:34 AM, Kyotaro HORIGUCHI wrote: > Nowadays PostgreSQL has dynamic shared hash (dshash) so we can > use this as the main storage of statistics. We can share data > without a stress using this. > > A PoC previously posted tried to use "locally copied" dshash but > it doesn'

Re: Should contrib modules install .h files?

2018-07-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> How about this: it's most likely that modules that install include >> files will also be using MODULE_big, so use that as the default >> name; if a makefile that uses only MODULES also wants to install >> include files, have it define MODULE_NAME (or some su

Re: Fix error message when trying to alter statistics on included column

2018-07-02 Thread Robert Haas
On Thu, Jun 28, 2018 at 5:28 AM, Yugo Nagata wrote: > According to the error message, it is not allowed to alter statistics on > included column because this is "non-expression column". > > postgres=# create table test (i int, d int); > CREATE TABLE > postgres=# create index idx on test(i) incl

Re: alter index WITH ( storage_parameter = value [, ... ] ) for partition index.

2018-07-02 Thread Robert Haas
On Wed, Jun 27, 2018 at 5:42 AM, Rajkumar Raghuwanshi wrote: > postgres=# alter index part_idx reset (fillfactor); > ERROR: "part_idx" is not a table, view, materialized view, or index I don't know whether that should work, but it seems like the error message needs improvement, at the least. --

Re: Regression on PostgreSQL 10 ORDER/GROUP BY expression not found in targetlist

2018-07-02 Thread Robert Haas
On Sat, Jun 30, 2018 at 5:38 PM, Tom Lane wrote: > I also think that there's some horribly unsafe coding in > apply_scanjoin_target_to_paths: it clobbers a RelOptInfo's reltarget, > with no thought for whether that might affect things elsewhere, > and it also clobbers individual paths' PathTargets

Re: Making all nbtree entries unique by having heap TIDs participate in comparisons

2018-07-02 Thread Peter Geoghegan
On Thu, Jun 14, 2018 at 11:44 AM, Peter Geoghegan wrote: > I attach an unfinished prototype of suffix truncation, that also > sometimes *adds* a new attribute in pivot tuples. It adds an extra > heap TID from the leaf level when truncating away non-distinguishing > attributes during a leaf page sp

Proposed fix for Bug #15259 (invalid empty array returned by intarray "&" operator)

2018-07-02 Thread Alexey Kryuchkov
The attached patch fixes Bug #15259 [1] in the intarray module, making the '&' array intersection operator return proper zero-dimensional empty arrays instead of one-dimensional, zero-length "empty" arrays. In [2] this problem was addressed by changing the behaviour of construct_[md_]array(), but

Re: psql \df option for procedures

2018-07-02 Thread Isaac Morland
While you're looking at \df, you might want to consider removing the display of source code (we have \sf for that, and it takes up a lot of space), and add a column to display access permissions (who can execute the function). On 2 July 2018 at 09:22, Fabrízio de Royes Mello wrote: > On Mon, Jul

Re: [WIP] [B-Tree] Retail IndexTuple deletion

2018-07-02 Thread Peter Geoghegan
On Mon, Jul 2, 2018 at 7:29 AM, Andrey V. Lepikhov wrote: > In the new version the patch [1] was used in cooperation with 'retail > indextuple deletion' and 'quick vacuum strategy' patches (see > '0004-Retail-IndexTuple-Deletion-with-TID-sorting-in-leaf-.patch'. Cool. I'm going to post a revised

Re: Tips on committing

2018-07-02 Thread Alvaro Herrera
On 2018-Jul-02, Stephen Frost wrote: > > * Do a dry run before really pushing by using --dry-run. > > In addition to this, I'd recommend using 'git show' on the results of > the --dry-run, so that you see what you're really about to push. Since commit 653530c8b196 I use this little script I borr

Re: [HACKERS] [PATCH] kNN for SP-GiST

2018-07-02 Thread Alexander Korotkov
Hi! On Fri, Jun 29, 2018 at 5:37 PM Nikita Glukhov wrote: > On 06.03.2018 17:30, David Steele wrote: > > > I agree with Andres. Pushing this patch to the next CF. > > Attached 4th version of the patches rebased onto the current master. > Nothing interesting has changed from the previous version.

Re: Tips on committing

2018-07-02 Thread Stephen Frost
Greetings, * Peter Geoghegan (p...@bowt.ie) wrote: > FWIW, I developed a document on committing for my own reference, with > some help from Andres. A lot of it is about commit message style, the > use of fields, and so on. But I've also developed a check list for > committing, knowing that there a

Re: pgsql: Fix "base" snapshot handling in logical decoding

2018-07-02 Thread Arseny Sher
Arseny Sher writes: > There is also one thing that puzzles me as I don't know much about > vacuum internals. If I do plain VACUUM of pg_attribute in the test, it > shouts "catalog is missing 1 attribute(s) for relid" error (which is > quite expected), while with 'VACUUM FULL pg_attribute' the tu

Re: branches_of_interest.txt

2018-07-02 Thread Tom Lane
Andres Freund writes: > On 2018-07-01 11:41:07 -0400, Tom Lane wrote: >> I can see the value of people other than you being able to change it, >> but keeping it in the core repo seems like a kluge not a proper solution. > FWIW, I've a manually maintained version of this in the scripts I use to >

Re: Should contrib modules install .h files?

2018-07-02 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> So, given that we have to add something to the module makefiles > Tom> anyway, we could also add a macro specifying the subdirectory name > Tom> to use. (Although in practice this should always be equal to the > Tom> contrib/ subdirecto

Re: ERROR: cannot start subtransactions during a parallel operation

2018-07-02 Thread Andres Freund
Hi, On 2018-07-01 11:02:24 +0200, Mai Peng wrote: > Hello, how could I relax the subtransaction restriction, I used the > Parallel Unsafe option, but still have the same issue. > Rgds. I'm unclear why you still get the error. Could you please give us the query triggering the error, including an e

Re: Should contrib modules install .h files?

2018-07-02 Thread Andres Freund
On 2018-07-02 16:11:07 +0100, Andrew Gierth wrote: > > "Tom" == Tom Lane writes: > > >> A slight snag in trying to use a subdir for each module is that > >> there is not in fact anywhere in the existing makefiles that uses or > >> assigns such a name. Indeed some contrib subdirs install mu

Re: branches_of_interest.txt

2018-07-02 Thread Andres Freund
On 2018-07-01 11:41:07 -0400, Tom Lane wrote: > Andrew Dunstan writes: > > This file on the buildfarm server is used to tell clients which branches > > we'd like built. When a new stable branch is created it's added manually > > to this file, and when one gets to EOL it's removed from the file.

Re: Should contrib modules install .h files?

2018-07-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: Tom> BTW, it's somewhat interesting to think about whether we ought to Tom> change the coding conventions so that extensions refer to their Tom> own headers with a subdirectory, e.g., #include "bloom/bloom.h". Tom> Having done that, all of contrib could build w

Re: Test-cases for deferred constraints in plpgsql_transaction.sql

2018-07-02 Thread Ashutosh Sharma
On Mon, Jul 2, 2018 at 7:07 PM, Tom Lane wrote: > Ashutosh Sharma writes: >> On Mon, Jul 2, 2018 at 3:30 PM, Peter Eisentraut >> wrote: >>> I won't say we don't need more tests, but I don't see a particular >>> testing gap in this area. > >> I am not saying that the existing test-case is not eno

Re: Should contrib modules install .h files?

2018-07-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> A slight snag in trying to use a subdir for each module is that >> there is not in fact anywhere in the existing makefiles that uses or >> assigns such a name. Indeed some contrib subdirs install multiple >> modules. Tom> So, given that we have to add some

Old small commitfest items

2018-07-02 Thread Andrew Dunstan
Andres talked about us concentrating on old items and very small items. Here's a list of items that are both old and small (FSVO "small"): The first number is the CF item number, the second the patch line count: 528 1146 Fix the optimization to skip WAL-logging on table created in same transactio

Re: [WIP] [B-Tree] Retail IndexTuple deletion

2018-07-02 Thread Andrey V. Lepikhov
On 29.06.2018 14:07, Юрий Соколов wrote: чт, 28 июн. 2018 г., 8:37 Andrey V. Lepikhov >: On 28.06.2018 05:00, Peter Geoghegan wrote: > On Tue, Jun 26, 2018 at 11:40 PM, Andrey V. Lepikhov > mailto:a.lepik...@postgrespro.ru>> wrote: >> I st

Re: Should contrib modules install .h files?

2018-07-02 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> FWIW, I agree with Andres' thought that each contrib module should > Tom> have its own subdirectory under $(includedir_server). Otherwise > Tom> we're going to be faced with questions about whether .h files need > Tom> to be renamed bec

Re: Should contrib modules install .h files?

2018-07-02 Thread Andrew Gierth
> "Tom" == Tom Lane writes: > Andrew Gierth writes: >> I'm thinking that $(includedir_server)/$(MODULEDIR) would be a >> reasonable place? MODULEDIR defaults to either "contrib" or >> "extension" depending on whether EXTENSION is set. Something like >> the attached patch seem reasonable

Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA

2018-07-02 Thread Jesper Pedersen
Hi, On 03/01/2018 10:50 AM, Jesper Pedersen wrote: As the patch still applies, make check-world passes and I believe that Yura has provided feedback for Andres' comments I'll leave this entry in "Ready for Committer". The patch from November 27, 2017 still applies (with hunks), passes "mak

Re: PANIC during crash recovery of a recently promoted standby

2018-07-02 Thread Michael Paquier
On Mon, Jul 02, 2018 at 04:25:13PM +0900, Kyotaro HORIGUCHI wrote: > When minRecoveryPoint is invalid, there're only two possible > cases. It may be at very beginning of archive reovery or may be > running a crash recovery. In the latter case, we have detected > crash recovery before redo starts. S

Re: Test-cases for deferred constraints in plpgsql_transaction.sql

2018-07-02 Thread Tom Lane
Ashutosh Sharma writes: > On Mon, Jul 2, 2018 at 3:30 PM, Peter Eisentraut > wrote: >> I won't say we don't need more tests, but I don't see a particular >> testing gap in this area. > I am not saying that the existing test-case is not enough to test > deferred constraints but, it would have bee

Re: Should contrib modules install .h files?

2018-07-02 Thread Tom Lane
Andrew Gierth writes: > I'm thinking that $(includedir_server)/$(MODULEDIR) would be a > reasonable place? MODULEDIR defaults to either "contrib" or "extension" > depending on whether EXTENSION is set. > Something like the attached patch seem reasonable? FWIW, I agree with Andres' thought that ea

Re: Monitoring time of fsyncing WALs

2018-07-02 Thread Michael Paquier
On Mon, Jul 02, 2018 at 11:36:06AM +0800, Craig Ringer wrote: > On 1 July 2018 at 11:29, Michael Paquier wrote: >> So at the end, I would like to use the proposed patch and call it a >> day. Thoughts? >> > Patch looks good. Thanks Craig for the review! I have just pushed the previous patch with

Re: psql \df option for procedures

2018-07-02 Thread Fabrízio de Royes Mello
On Mon, Jul 2, 2018 at 7:07 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > > psql's \df command current has options a/n/t/w to show > aggregates/normal/trigger/window functions. Do we want to add something > for procedures? > +1. I can write a patch to save your time If you don

Re: [PATCH] Include application_name in "connection authorized" log message

2018-07-02 Thread Don Seiler
On Mon, Jul 2, 2018 at 2:13 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 21.06.18 16:21, Don Seiler wrote: > > - (errmsg("connection > > authorized: user=%s database=%s", > > - > > port->user_name, port->database_name))); > > +

Re: branches_of_interest.txt

2018-07-02 Thread Tom Lane
Robert Haas writes: > On Mon, Jul 2, 2018 at 8:18 AM, Andrew Dunstan > wrote: >> An alternative would be to create a special branch within the core >> repo for such data, something like this (The first two lines are the >> ones that are most important): >> ... >> The new branch won't share any hi

Re: branches_of_interest.txt

2018-07-02 Thread Andrew Dunstan
On Mon, Jul 2, 2018 at 8:33 AM, Robert Haas wrote: > On Mon, Jul 2, 2018 at 8:18 AM, Andrew Dunstan > wrote: >> Ideally this would be done as part of creating the new branch. Since >> the web site doesn't have the same set of committers, a second metdata >> repo like this seems sensible. >> An al

Re: branches_of_interest.txt

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 8:18 AM, Andrew Dunstan wrote: > Ideally this would be done as part of creating the new branch. Since > the web site doesn't have the same set of committers, a second metdata > repo like this seems sensible. > An alternative would be to create a special branch within the cor

Re: Explain buffers wrong counter with parallel plans

2018-07-02 Thread Robert Haas
On Sun, Jun 10, 2018 at 1:18 AM, Amit Kapila wrote: > Right, I think we have following options: > (a) Come up with a solution which allows percolating the buffer usage > and or similar stats to upper nodes in all cases. > (b) Allow it to work for some of the cases as it was earlier. > > I think (b

Re: Explain buffers wrong counter with parallel plans

2018-07-02 Thread Robert Haas
On Fri, Jun 29, 2018 at 6:12 PM, Tom Lane wrote: > Alvaro Herrera writes: >> I'm CCing Tom here, as author of the patch that caused (most of) the >> issue. > > Uh ... me? I thought this was a parallel-query issue, which I've > pretty much not been involved in. Well, it was your commit that caus

Re: branches_of_interest.txt

2018-07-02 Thread Andrew Dunstan
On Mon, Jul 2, 2018 at 4:45 AM, Magnus Hagander wrote: > > > On Mon, Jul 2, 2018 at 10:39 AM, Peter Eisentraut > wrote: >> >> On 01.07.18 17:41, Tom Lane wrote: >> > I can see the value of people other than you being able to change it, >> > but keeping it in the core repo seems like a kluge not a

Re: ERROR: cannot start subtransactions during a parallel operation

2018-07-02 Thread Robert Haas
On Sun, Jul 1, 2018 at 5:02 AM, Mai Peng wrote: > Hello, how could I relax the subtransaction restriction, I used the Parallel > Unsafe option, but still have the same issue. There's no user option for that. Somebody would need to enhance PostgreSQL by writing a patch. I agree with Andres that

Re: branches_of_interest.txt

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 4:39 AM, Peter Eisentraut wrote: > On 01.07.18 17:41, Tom Lane wrote: >> I can see the value of people other than you being able to change it, >> but keeping it in the core repo seems like a kluge not a proper solution. >> In particular, once it'd been around for awhile so t

Re: Avoid extra Sort nodes between WindowAggs when sorting can be reused

2018-07-02 Thread Masahiko Sawada
On Mon, Jul 2, 2018 at 5:25 PM, Daniel Gustafsson wrote: >> On 26 Jun 2018, at 17:11, Alexander Kuzmenkov >> wrote: > >> I took a look at the patch. It applies and compiles, the tests pass. > > Thanks for reviewing, and apologies for the slow response. > >> Some thoughts about the code: >> >> *

Re: jsonpath

2018-07-02 Thread Nikita Glukhov
On 28.06.2018 05:39, Thomas Munro wrote: On Thu, Jun 28, 2018 at 11:38 AM, Nikita Glukhov wrote: Attached 15th version of the patches. Hi Nikita, I wonder why the Windows build scripts are not finding and processing your new .y and .l files: https://ci.appveyor.com/project/postgresql-cfbot/

Re: Cache lookup errors with functions manipulation object addresses

2018-07-02 Thread Michael Paquier
On Sun, Jul 01, 2018 at 12:31:17PM -0400, Andrew Dunstan wrote: > I think you're asserting far too broad a policy for the CF, and in any case > there has been no discussion of what exactly is a large patch. I don't see > any great need to defer patch 3. It is substantial although not what I would >

Re: effect of JIT tuple deform?

2018-07-02 Thread Pierre Ducroquet
On Wednesday, June 27, 2018 5:38:31 PM CEST Pavel Stehule wrote: > 2018-06-27 17:19 GMT+02:00 Tomas Vondra : > > On 06/26/2018 09:25 PM, Pavel Stehule wrote: > >> Hi > >> > >> ... > >> > >> So I am able to see effect of jit_tuple_deforming, and very well, but > >> only if optimization is active.

Re: Concurrency bug in UPDATE of partition-key

2018-07-02 Thread Amit Khandekar
On 30 June 2018 at 19:20, Amit Kapila wrote: > On Fri, Jun 29, 2018 at 11:22 PM, Alvaro Herrera > wrote: >> I was a bit surprised by the new epqslot output argument being added, >> and now I think I know why: we already have es_trig_tuple_slot, so >> shouldn't we be using that here instead? See

Re: Test-cases for deferred constraints in plpgsql_transaction.sql

2018-07-02 Thread Ashutosh Sharma
On Mon, Jul 2, 2018 at 3:30 PM, Peter Eisentraut wrote: > On 02.07.18 11:46, Ashutosh Sharma wrote: >> Currently, I could see only one test-case for deferred constraints in >> plpgsql_transaction.sql file which tests if the constraint checking is >> happening during commit time or not with the hel

Re: How to find the base version cf-bot is using?

2018-07-02 Thread Thomas Munro
On Mon, Jul 2, 2018 at 9:39 PM, Kyotaro HORIGUCHI wrote: >> === applying patch >> ./v4-0001-Remove-entries-that-haven-t-been-used-for-a-certain-.patch > ... >> |Date: Tue, 26 Dec 2017 17:43:09 +0900 > ... >> Patching file src/backend/utils/cache/plancache.c using Plan A... >> Hunk #1 failed at 63

Re: psql \df option for procedures

2018-07-02 Thread Andrew Gierth
> "Peter" == Peter Eisentraut writes: Peter> psql's \df command current has options a/n/t/w to show Peter> aggregates/normal/trigger/window functions. Do we want to add Peter> something for procedures? yes -- Andrew (irc:RhodiumToad)

psql \df option for procedures

2018-07-02 Thread Peter Eisentraut
psql's \df command current has options a/n/t/w to show aggregates/normal/trigger/window functions. Do we want to add something for procedures? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Should contrib modules install .h files?

2018-07-02 Thread Andrew Gierth
> "Peter" == Peter Eisentraut writes: >> So I have this immediate problem: a PGXS build of a module, >> specifically an hstore transform for a non-core PL, is much harder >> than it should be because it has no way to get at hstore.h since >> that file is never installed anywhere. >> >>

Re: Test-cases for deferred constraints in plpgsql_transaction.sql

2018-07-02 Thread Peter Eisentraut
On 02.07.18 11:46, Ashutosh Sharma wrote: > Currently, I could see only one test-case for deferred constraints in > plpgsql_transaction.sql file which tests if the constraint checking is > happening during commit time or not with the help of COMMIT statement. > Shouldn't we add some more test-cases

Re: Global shared meta cache

2018-07-02 Thread Konstantin Knizhnik
On 26.06.2018 09:48, Ideriha, Takeshi wrote: Hi, hackers! My customer created hundreds of thousands of partition tables and tried to select data from hundreds of applications, which resulted in enormous consumption of memory because it consumed # of backend multiplied by # of local memory (

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-07-02 Thread Etsuro Fujita
(2018/06/22 23:58), Robert Haas wrote: I think this approach is going to run into trouble if the level at which we have to apply the ConvertRowTypeExpr happens not to be a projection-capable node. Actually, the level we have to do that would be a child rel of a partitioned table or a child joi

  1   2   >