Re: LD_LIBRARY_PATH_RPATH

2019-01-31 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> At least on my FreeBSD 11 box, the current definition of >> $(with_temp_install) is not sufficient to ensure that the various >> .so files are loaded from tmp_install and not from the compiled >> rpath (which will be the final install dir, which may of

RE: reloption to prevent VACUUM from truncating empty pages at the end of relation

2019-01-31 Thread Tsunakawa, Takayuki
From: Jamison, Kirk/ジャミソン カーク > I wonder if there is a better reloption name for shrink_enabled. > (truncate_enabled, vacuum_enabled? Hmm. No?) > On the other hand, shrink_enabled seems to describe well what it's supposed > to do when vacuuming tables. > Besides there's a similarly-named

RE: reloption to prevent VACUUM from truncating empty pages at the end of relation

2019-01-31 Thread Jamison, Kirk
On February 1, 2019, Tsunakawa, Takayuki wrote: >> As most people seem to agree adding the reloption, here's the patch. >> It passes make check, and works like this: >Sorry, I forgot to include the modified header file. Revised patch attached. Thank you for this. I applied the patch. It

initdb --allow-group-access behaviour in windows

2019-01-31 Thread Haribabu Kommi
Hi Hackers, During the testing of new feature allowing group access mode for the data directory by specifying initdb --allow-group-access by one of my collegue, we didn't observe any change in the data folder permissions. With/without group access the data folder have permissions to the group.

RE: ALTER SESSION

2019-01-31 Thread Tsunakawa, Takayuki
Thanks for a cool feature with nice UI. Can I expect it to work for background processes? For troubleshooting, I wanted to investigate how autovacuum launcher/worker behaves by having them emit DEBUG messages. (My comments follow) From: Kyotaro HORIGUCHI

Re: possible deadlock: different lock ordering for heap pages

2019-01-31 Thread Nishant, Fnu
On 1/31/19, 9:21 PM, "Amit Kapila" wrote: > BTW, do you have a reproducible test case for this fix? How did you catch this, browsing code? Yes, I observed it while reading code. I do not have a repro. > How do we pronounce your name, is Nishant Fnu okay? I would like to

Re: possible deadlock: different lock ordering for heap pages

2019-01-31 Thread Amit Kapila
On Mon, Jan 21, 2019 at 10:39 PM Nishant, Fnu wrote: > > Thanks Amit for your review. > > On 1/20/19, 6:55 AM, "Amit Kapila" wrote: > > I think you need to change below code as well >Assert(buffer2 == InvalidBuffer || buffer1 <= buffer2); > > Done. Updated the patch. > Attached

RE: reloption to prevent VACUUM from truncating empty pages at the end of relation

2019-01-31 Thread Tsunakawa, Takayuki
From: Tsunakawa, Takayuki [mailto:tsunakawa.ta...@jp.fujitsu.com] > As most people seem to agree adding the reloption, here's the patch. It > passes make check, and works like this: Sorry, I forgot to include the modified header file. Revised patch attached. Regards Takayuki Tsunakawa

Re: LD_LIBRARY_PATH_RPATH

2019-01-31 Thread Tom Lane
Andrew Gierth writes: > At least on my FreeBSD 11 box, the current definition of > $(with_temp_install) is not sufficient to ensure that the various .so > files are loaded from tmp_install and not from the compiled rpath (which > will be the final install dir, which may of course contain old >

Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well

2019-01-31 Thread Tom Lane
Michael Paquier writes: > Attached is a patch doing that. Thoughts? WFM. regards, tom lane

Re: [HACKERS] generated columns

2019-01-31 Thread Michael Paquier
On Thu, Jan 17, 2019 at 10:12:26AM +0900, Michael Paquier wrote: > Yes, something like that grows the memory and CPU usage rather > linearly: > CREATE TABLE tab (a int, b int GENERATED ALWAYS AS (a * 2) STORED); > INSERT INTO tab VALUES (generate_series(1,1)); The latest patch set got

Re: pg_dumpall --exclude-database option

2019-01-31 Thread Michael Paquier
On Thu, Dec 27, 2018 at 10:55:43PM +0100, Fabien COELHO wrote: > I do not "want" to do a patch for that:-) Anyway, a small patch is attached > which adds comments to pg_dumpall output sections. Patch has been moved to next CF with the same status, ready for committer. Andrew, are you planning to

Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well

2019-01-31 Thread Michael Paquier
On Thu, Jan 31, 2019 at 11:19:11AM +0900, Michael Paquier wrote: > Ah yes, good point about CFLAGS and LDFLAGS. It would be better to > add a comment about that and document the difference, aka "prepend" or > "append" the flag values. > > CXXFLAGS applies to compiler options like -g -O2 which

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread Amit Kapila
On Thu, Jan 31, 2019 at 9:18 PM John Naylor wrote: > > On Thu, Jan 31, 2019 at 4:06 PM Amit Kapila wrote: > > I don't think that moving fsm tests to brin would be a good approach. > > We want to have a separate test for each access method. I think if we > > want to do something to avoid

Re: tab-completion debug print

2019-01-31 Thread Michael Paquier
On Thu, Jan 31, 2019 at 04:53:49AM -0800, Andres Freund wrote: > My impression is that this patch ought to marked as rejected? I may be missing something, but I have the same impression. -- Michael signature.asc Description: PGP signature

RE: reloption to prevent VACUUM from truncating empty pages at the end of relation

2019-01-31 Thread Tsunakawa, Takayuki
From: Jamison, Kirk [mailto:k.jami...@jp.fujitsu.com] > >On Thu, Nov 15, 2018 at 2:30 PM Alvaro Herrera > wrote: > >> > >> On 2018-Nov-15, Laurenz Albe wrote: > >> > > > > This new option would not only mitigate the long shared_buffers > > > > scan, it would also get rid of the replication

Re: allow online change primary_conninfo

2019-01-31 Thread Michael Paquier
On Thu, Jan 31, 2019 at 04:13:22PM +0300, Sergei Kornilov wrote: > I my opinion this is not issue, database logs can have sensitive > data. User queries, for example. If we not want expose such info - > it is ok just hide new value from logs with new GUC flag? Or i need > implement masked

Re: A few new options for vacuumdb

2019-01-31 Thread Michael Paquier
On Thu, Jan 31, 2019 at 03:41:34PM +, Bossart, Nathan wrote: > Thanks for the diligent reviews, as always. I don't plan to pick up > --min-relation-size right now, but I may attempt it again in a future > commitfest. Sure, thanks for the patches! -- Michael signature.asc Description: PGP

Re: Don't wake up to check trigger file if none is configured

2019-01-31 Thread Michael Paquier
On Thu, Jan 31, 2019 at 04:09:56PM +0900, Michael Paquier wrote: > So, does somebody have an objection if I apply the comment patch? Per > the reasons above, the proposed patch is not correct, but the code can > be more descriptive. The comment patch has been applied, and the patch has been

Re: XLogInsert() of dangling pointer while logging replica identity

2019-01-31 Thread Michael Paquier
On Thu, Jan 31, 2019 at 11:51:36PM +0300, Stas Kelvich wrote: > It seems that heapam.c:3082 calls XLogRegisterData() with an argument > allocated on stack, but following call to XLogInsert() happens after > end of context for that variable. > Issue spotted by clang's AddressSanitizer. Fix

Re: Delay locking partitions during query execution

2019-01-31 Thread David Rowley
On Fri, 1 Feb 2019 at 10:32, Robert Haas wrote: > > On Sun, Jan 27, 2019 at 8:26 PM David Rowley > wrote: > > One way around this would be to always perform an invalidation on the > > partition's parent when performing a relcache invalidation on the > > partition. We could perhaps invalidate

Re: Prepare Transaction support for ON COMMIT DROP temporary tables

2019-01-31 Thread Michael Paquier
On Mon, Jan 28, 2019 at 04:06:11PM +0900, Michael Paquier wrote: > If you really intend to drop any trace of the objects at PREPARE > phase, that does not seem completely impossible to me, still you would > also need handling for the case where the temp table created also > creates the temporary

LD_LIBRARY_PATH_RPATH

2019-01-31 Thread Andrew Gierth
At least on my FreeBSD 11 box, the current definition of $(with_temp_install) is not sufficient to ensure that the various .so files are loaded from tmp_install and not from the compiled rpath (which will be the final install dir, which may of course contain old libraries).

Re: amcheck verification for GiST

2019-01-31 Thread Peter Geoghegan
On Tue, Jan 1, 2019 at 2:11 AM Andrey Borodin wrote: > > This isn't consistent with what you do within verify_nbtree.c, which > > deliberately avoids ever holding more than a single buffer lock at a > > time, on general principle. That isn't necessarily a reason why you > > have to do the same,

Re: pg_stat_ssl additions

2019-01-31 Thread Peter Eisentraut
On 29/01/2019 13:11, Peter Eisentraut wrote: > On 29/01/2019 04:18, Kyotaro HORIGUCHI wrote: >> Some further investigation told me that the file >> ~/.postgresql/root.cert was the culprit. > > OK, I could reproduce the problem and found a fix for it. Basically you > need to specify sslrootcert

Re: Delay locking partitions during query execution

2019-01-31 Thread Tomas Vondra
On 1/31/19 10:31 PM, Robert Haas wrote: > On Sun, Jan 27, 2019 at 8:26 PM David Rowley > wrote: >> One way around this would be to always perform an invalidation on the >> partition's parent when performing a relcache invalidation on the >> partition. We could perhaps invalidate all the way

Re: ATTACH/DETACH PARTITION CONCURRENTLY

2019-01-31 Thread Alvaro Herrera
On 2019-Jan-31, Robert Haas wrote: > OK, that seems to be pretty easy. New patch series attached. The > patch with that new logic is 0004. I've consolidated some of the > things I had as separate patches in my last post and rewritten the > commit messages to explain more clearly the purpose of

Re: Using POPCNT and other advanced bit manipulation instructions

2019-01-31 Thread Alvaro Herrera
I only have cosmetic suggestions for this patch. For one thing, I think the .c file should be in src/port and its header should be in src/include/port/, right beside the likes of pg_bswap.h and pg_crc32c.h. For another, I think the arrangement of all those "ifdef HAVE_THIS_OR_THAT" in the

Re: Delay locking partitions during INSERT and UPDATE

2019-01-31 Thread David Rowley
On Fri, 1 Feb 2019 at 07:46, Robert Haas wrote: > I have reviewed this patch and I am in favor of it. I think it likely > needs minor rebasing because of the heap_open -> table_open renaming. Many thanks for looking at it. The v2 patch was based on top of the heap_open -> table_open change.

Re: Delay locking partitions during query execution

2019-01-31 Thread Robert Haas
On Sun, Jan 27, 2019 at 8:26 PM David Rowley wrote: > One way around this would be to always perform an invalidation on the > partition's parent when performing a relcache invalidation on the > partition. We could perhaps invalidate all the way up to the top > level partitioned table, that way

Re: [HACKERS] Block level parallel vacuum

2019-01-31 Thread Masahiko Sawada
On Wed, Jan 30, 2019 at 2:06 AM Haribabu Kommi wrote: > > > On Thu, Jan 24, 2019 at 1:16 PM Masahiko Sawada wrote: >> >> >> Attached the latest patches. > > > Thanks for the updated patches. > Some more code review comments. > Thank you! > + started by a single utility command.

XLogInsert() of dangling pointer while logging replica identity

2019-01-31 Thread Stas Kelvich
Hi, hackers. It seems that heapam.c:3082 calls XLogRegisterData() with an argument allocated on stack, but following call to XLogInsert() happens after end of context for that variable. Issue spotted by clang's AddressSanitizer. Fix attached. -- Stas Kelvich Postgres Professional:

Re: [Patch] Log10 and hyperbolic functions for SQL:2016 compliance

2019-01-31 Thread Lætitia Avrot
Hi, Thanks to Emil Iggland's kind review, I added precision on documentation for hyperbolic functions. I added the patch to the next commitfest. Cheers, Lætitia Le dim. 27 janv. 2019 à 20:39, Lætitia Avrot a écrit : > Hi, > > Thanks for your time and advice, Tom! > > >> > [

Re: Proposed refactoring of planner header files

2019-01-31 Thread Tom Lane
Robert Haas writes: > I do not have a powerful opinion on exactly what to do here, but I > offer the following for what it's worth: > - I do not really think much of the selfuncs.c naming. Nobody who is > not deeply immersed in the PostgreSQL code knows what a "selfunc" is. > Therefore,

Re: pg_upgrade: Pass -j down to vacuumdb

2019-01-31 Thread Jesper Pedersen
Hi, On 1/30/19 7:59 PM, Jamison, Kirk wrote: I added most of the documentation back, as requested by Kirk. Actually, I find it useful to be documented. However, major contributors have higher opinions in terms of experience, so I think it's alright with me not to include the doc part if

Re: Proposed refactoring of planner header files

2019-01-31 Thread Robert Haas
On Thu, Jan 31, 2019 at 2:46 PM Tom Lane wrote: > I'm happy to do the work if there's consensus on what to do. After > a few moments' thought, I'd suggest: > > 1. Move the indexscan cost estimation functions into a new file > adt/index_selfuncs.c. Most of them already are declared in >

Re: pgsql: Build src/port files as a library with -fPIC, and use that in li

2019-01-31 Thread Robert Haas
On Thu, Jan 31, 2019 at 2:50 PM Tom Lane wrote: > Robert Haas writes: > > Isn't the issue more a matter of whether it's OK to break > > compatibility without changing SO_*_VERSION? > > We're breaking compatibility only if you regard pqsignal() as > part of the advertised API, which I don't.

Re: pgsql: Build src/port files as a library with -fPIC, and use that in li

2019-01-31 Thread Tom Lane
Robert Haas writes: > On Thu, Jan 31, 2019 at 2:50 PM Tom Lane wrote: >> We're breaking compatibility only if you regard pqsignal() as >> part of the advertised API, which I don't. > Well, I would agree with that if it weren't the case that binaries we > ship apparently use that API. If we say

Re: pgsql: Build src/port files as a library with -fPIC, and use that in li

2019-01-31 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 29, 2019 at 10:10 AM Tom Lane wrote: >> Well, 8.2 is *very* long out of support, and there are plenty of >> nasty bugs you're at risk of if you keep using it. So I don't >> find this to be a good argument for contorting what we do in v12. > Isn't the issue

Re: Proposed refactoring of planner header files

2019-01-31 Thread Tom Lane
Robert Haas writes: > On Wed, Jan 30, 2019 at 10:08 PM Tom Lane wrote: >> However ... there are three pretty clearly identifiable groups of >> functions in selfuncs.c: operator-specific estimators, support >> functions, and AM-specific indexscan cost estimation functions. >> There's a case to be

Re: pgsql: Build src/port files as a library with -fPIC, and use that in li

2019-01-31 Thread Robert Haas
On Tue, Jan 29, 2019 at 10:10 AM Tom Lane wrote: > Well, 8.2 is *very* long out of support, and there are plenty of > nasty bugs you're at risk of if you keep using it. So I don't > find this to be a good argument for contorting what we do in v12. Isn't the issue more a matter of whether it's

Re: Proposed refactoring of planner header files

2019-01-31 Thread Robert Haas
On Wed, Jan 30, 2019 at 10:08 PM Tom Lane wrote: > However ... there are three pretty clearly identifiable groups of > functions in selfuncs.c: operator-specific estimators, support > functions, and AM-specific indexscan cost estimation functions. > There's a case to be made for splitting them

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

2019-01-31 Thread Carter Thaxton
> > Unfortunately, current version of this patch has some conflicts, could > you > > rebase it? > > Given this patch has not been updated, I'm marking this as returned with > feedback. > Here's a rebased patch that works with the latest master branch. Very straightforward.

Re: possible deadlock: different lock ordering for heap pages

2019-01-31 Thread Robert Haas
On Sun, Jan 20, 2019 at 9:55 AM Amit Kapila wrote: > Robert, can you please once see if we are missing anything here > because to me the report and fix look genuine. I think so, too. I guess the probability of a deadlock here must be *very* low. -- Robert Haas EnterpriseDB:

Re: Delay locking partitions during INSERT and UPDATE

2019-01-31 Thread Robert Haas
On Thu, Jan 24, 2019 at 4:43 PM Tomas Vondra wrote: > Yes, I don't see why would the patch change that and I've been looking > for such cases. I think David was looking at that this week too, and I > assume he'll send an update if he finds anything. If not, I plan to get > it committed soon-ish

Re: ATTACH/DETACH PARTITION CONCURRENTLY

2019-01-31 Thread Robert Haas
On Tue, Jan 29, 2019 at 1:59 PM Robert Haas wrote: > I don't know how to reduce this to something reliable enough to > include it in the regression tests, and maybe we don't really need > that, but it's good to know that this is not a purely theoretical > problem. I think next I'll try to write

Re: Fast path for empty relids in check_outerjoin_delay()

2019-01-31 Thread Tom Lane
Since we've reached the end of the January commitfest, and it's pretty clear that this patch isn't going to get committed in anything like its current form, I'm going to close the CF entry as returned with feedback. If you come up with a follow-on patch, please create a new CF entry.

Re: Statement-level rollback

2019-01-31 Thread Alvaro Herrera
On 2019-Jan-31, Greg Stark wrote: > This looks like repeating the autocommit mistakes of the past. Yeah, this argument has been made before. Peter E argued against that: https://postgr.es/m/ea395aa8-5ac4-6bcd-366d-aab2ff2b0...@2ndquadrant.com > And based on that experience wouldn't the

Re: Global snapshots

2019-01-31 Thread Stas Kelvich
> On 31 Jan 2019, at 18:42, Andres Freund wrote: > > Hi, > > On 2018-11-30 16:00:17 +0300, Stas Kelvich wrote: >>> On 29 Nov 2018, at 18:21, Dmitry Dolgov <9erthali...@gmail.com> wrote: >>> Is there any resulting patch where the ideas how to implement this are >>> outlined? >> >> Not yet.

Re: Installation instructions update (pg_ctl)

2019-01-31 Thread Michael Banck
Hi, On Sat, Nov 03, 2018 at 09:56:46PM +0100, Andreas 'ads' Scherbaum wrote: > >That's indeed one replacement too much. > > > >The attached patch is fixing this. > > > >Thank you for the review! > > > > Submitted this to the Commitfest, and took the liberty to add you as a > reviewer. Sorry, I

Re: Statement-level rollback

2019-01-31 Thread Greg Stark
On Fri 7 Dec 2018, 21:43 Robert Haas On Fri, Dec 7, 2018 at 3:34 PM Alvaro Herrera > wrote: > > Yeah, I agree that this downside is real. I think our only protection > > against that is to say "don't do that". Like any other tool, it has > > upsides and downsides; we shouldn't keep it away

Re: MERGE SQL statement for PG12

2019-01-31 Thread Alvaro Herrera
I'm going to close this patch as returned with feedback, since it's had plenty and it's pretty clear that it will take some time to address it. Pavan is welcome to resubmit when he has a new version. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread John Naylor
On Thu, Jan 31, 2019 at 4:06 PM Amit Kapila wrote: > I don't think that moving fsm tests to brin would be a good approach. > We want to have a separate test for each access method. I think if we > want to do something to avoid portability issues, maybe we can do what > Masahiko San has just

Re: [HACKERS] [PATCH] Generic type subscripting

2019-01-31 Thread Dmitry Dolgov
> On Thu, Jan 31, 2019 at 4:39 PM Alvaro Herrera > wrote: > > That having been said ... while the current 0001 patch does apply > semi-cleanly (`git apply -3` does it), it does not compile, probably > because of header refactoring. Please rebase and make sure that each > individual patch

Re: [HACKERS] [PATCH] Generic type subscripting

2019-01-31 Thread Pavel Stehule
čt 31. 1. 2019 v 16:39 odesílatel Alvaro Herrera napsal: > Would anybody object to me pushing part 0001 soon? It seems pointless > to force Dmitry keep rebasing a huge renaming patch all this time. I > think the general feeling is that this is a desirable change, so let's > keep things moving.

Re: Global snapshots

2019-01-31 Thread Andres Freund
Hi, On 2018-11-30 16:00:17 +0300, Stas Kelvich wrote: > > On 29 Nov 2018, at 18:21, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > Is there any resulting patch where the ideas how to implement this are > > outlined? > > Not yet. I’m going to continue work on this in January. And probably try

Re: A few new options for vacuumdb

2019-01-31 Thread Bossart, Nathan
On 1/30/19, 8:21 PM, "Michael Paquier" wrote: > Fixed and committed. So we are finally done here, except for the > debate with the relation size. Thanks for the diligent reviews, as always. I don't plan to pick up --min-relation-size right now, but I may attempt it again in a future

Re: [HACKERS] [PATCH] Generic type subscripting

2019-01-31 Thread Alvaro Herrera
Would anybody object to me pushing part 0001 soon? It seems pointless to force Dmitry keep rebasing a huge renaming patch all this time. I think the general feeling is that this is a desirable change, so let's keep things moving. That having been said ... while the current 0001 patch does apply

Re: PostgreSQL vs SQL/XML Standards

2019-01-31 Thread Pavel Stehule
so 26. 1. 2019 v 1:38 odesílatel Chapman Flack napsal: > On 01/25/19 00:45, Pavel Stehule wrote: > > pá 25. 1. 2019 v 5:46 odesílatel Chapman Flack > > napsal: > >> I am: > >> - re-attaching xmltable-xpath-result-processing-bugfix-5.patch unchanged > >> (just so CF app does not lose track) >

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

2019-01-31 Thread Andres Freund
Hi, On 2018-11-29 19:04:24 +0100, Dmitry Dolgov wrote: > > On Tue, Oct 2, 2018 at 7:43 AM Michael Paquier wrote: > > > > On Thu, Jul 12, 2018 at 03:07:33PM -0400, Robbie Harwood wrote: > > > This patch looks good to me. +1; Álvaro, please update the CF entry > > > when you're also satisfied. >

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread Amit Kapila
On Thu, Jan 31, 2019 at 7:23 PM John Naylor wrote: > > On Thu, Jan 31, 2019 at 1:52 PM John Naylor > wrote: > > > > On Thu, Jan 31, 2019 at 1:43 PM Amit Kapila wrote: > > > > I have an idea -- instead of adding a bunch of records and hoping that > > > > the relation size and free space is

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread Masahiko Sawada
On Thu, Jan 31, 2019 at 6:41 AM Amit Kapila wrote: > > On Wed, Jan 30, 2019 at 10:41 PM Masahiko Sawada > wrote: > > > > On Wed, Jan 30, 2019 at 4:33 AM Amit Kapila wrote: > > > > > > On Tue, Jan 29, 2019 at 8:12 PM John Naylor > > > wrote: > > > > > > > > On Tue, Jan 29, 2019 at 11:56 AM

Re: interval type additional option

2019-01-31 Thread Pavel Stehule
čt 31. 1. 2019 v 15:33 odesílatel Andrew Gierth napsal: > > "Pavel" == Pavel Stehule writes: > > Pavel> Hi > Pavel> I have a value '400 days 30 sec':: interval > > Pavel> I don't understand why cast > > Pavel> postgres=# select '400days 30sec'::interval minute to second; > > ... > >

Re: interval type additional option

2019-01-31 Thread Andrew Gierth
> "Pavel" == Pavel Stehule writes: Pavel> Hi Pavel> I have a value '400 days 30 sec':: interval Pavel> I don't understand why cast Pavel> postgres=# select '400days 30sec'::interval minute to second; ... Pavel> What is sense of this feature? As far as I know it only exists

Re: Implementing Incremental View Maintenance

2019-01-31 Thread Yugo Nagata
On Mon, 7 Jan 2019 00:39:00 -0800 Mitar wrote: > That sounds great! I am interested in this topic because I am > interested in reactive/live queries and support for them in > PostgreSQL. [1] > > In that context, the problem is very similar: based on some state of > query results and updated

Re: Allow auto_explain to log to NOTICE

2019-01-31 Thread Daniel Gustafsson
> On 5 Jan 2019, at 01:04, Michael Paquier wrote: > > On Fri, Jan 04, 2019 at 02:45:55PM +0100, Daniel Gustafsson wrote: >> (Michael: sorry for not having responded to your comments on the patch, $life >> has had little time over for hacking lately) > > No worries, I understand. > >> There is

Re: Add client connection check during the execution of the query

2019-01-31 Thread Andres Freund
Hi, On 2019-01-13 18:05:39 -0500, Tom Lane wrote: > s.cherkas...@postgrespro.ru writes: > > This patch adds verification of the connection with the client during > > the execution of the SQL query. The feature enables using the GUC > > variable ‘client_connection_check_interval’. The default

Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2019-01-31 Thread Pavel Stehule
čt 31. 1. 2019 v 14:44 odesílatel Andres Freund napsal: > Hi, > > On 2018-09-18 11:33:38 -0400, Tom Lane wrote: > > Pavel Stehule writes: > > > [ xml-xpath-default-ns-7.patch ] > > > > At Andrew's prompting, I took a look over this patch. I don't know much > > of anything about XML, so I have

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread John Naylor
On Thu, Jan 31, 2019 at 1:52 PM John Naylor wrote: > > On Thu, Jan 31, 2019 at 1:43 PM Amit Kapila wrote: > > > I have an idea -- instead of adding a bunch of records and hoping that > > > the relation size and free space is consistent across platforms, how > > > about we revert to the original

Re: [HACKERS] proposal - Default namespaces for XPath expressions (PostgreSQL 11)

2019-01-31 Thread Andres Freund
Hi, On 2018-09-18 11:33:38 -0400, Tom Lane wrote: > Pavel Stehule writes: > > [ xml-xpath-default-ns-7.patch ] > > At Andrew's prompting, I took a look over this patch. I don't know much > of anything about XML, so I have no idea as to standards compliance here, > but I do have some comments:

interval type additional option

2019-01-31 Thread Pavel Stehule
Hi I have a value '400 days 30 sec':: interval I don't understand why cast postgres=# select '400days 30sec'::interval minute to second; +---+ | interval | +---+ | 400 days 00:00:30 | +---+ (1 row) produce 400 days or postgres=# create

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

2019-01-31 Thread Andres Freund
Hi, On 2018-11-29 13:50:21 +0100, Dmitry Dolgov wrote: > Unfortunately, current version of this patch has some conflicts, could you > rebase it? Given this patch has not been updated, I'm marking this as returned with feedback. Greetings, Andres Freund

Re: allow online change primary_conninfo

2019-01-31 Thread Sergei Kornilov
Hello Yeah, we have no consensus. Another open question is about logging new primary_conninfo: > LOG: parameter "primary_conninfo" changed to "host=/tmp port=5432 > password=hoge" I my opinion this is not issue, database logs can have sensitive data. User queries, for example. If we not want

Re: bug tracking system

2019-01-31 Thread Alvaro Herrera
On 2019-Jan-31, Alvaro Herrera wrote: > Here's a bug tracking system that Nathan set up many years ago and > apparently has kept going unattended. It seems to me that it's > something that we could base a semi-official bug tracking system on. I didn't really remember that Nathan's system had

Re: allow online change primary_conninfo

2019-01-31 Thread and...@anarazel.de
Hi, On 2018-12-14 16:55:42 +0900, Michael Paquier wrote: > On Thu, Dec 13, 2018 at 01:51:48PM +0300, Sergei Kornilov wrote: > > Depends on this discussion: > > https://www.postgresql.org/message-id/20181212053042.gk17...@paquier.xyz > > If walreceiver will use GUC conninfo for startup - then

Re: tab-completion debug print

2019-01-31 Thread Andres Freund
Hi, On 2018-12-14 08:45:49 +0100, Peter Eisentraut wrote: > On 14/12/2018 06:41, David Fetter wrote: > > There are problems tab completion, e.g. its catalog queries, could > > cause in production that would be difficult to simulate elsewhere. > > Where are all these reports of tab completion

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread John Naylor
On Thu, Jan 31, 2019 at 1:43 PM Amit Kapila wrote: > > I have an idea -- instead of adding a bunch of records and hoping that > > the relation size and free space is consistent across platforms, how > > about we revert to the original test input, and add a BRIN index? That > > should have a FSM

Re: Reorganize collation lookup time and place

2019-01-31 Thread Andres Freund
Hi, On 2018-12-13 14:50:53 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2018-12-13 15:05:40 +0100, Peter Eisentraut wrote: > >> On 12/12/2018 18:56, Andres Freund wrote: > >>> Why isn't this integrated into fmgr_info()? > > >> fmgr_info() looks up stuff in pg_proc. pg_newlocale_...()

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread Amit Kapila
On Thu, Jan 31, 2019 at 2:12 PM John Naylor wrote: > > On Thu, Jan 31, 2019 at 6:41 AM Amit Kapila wrote: > > > > On Wed, Jan 30, 2019 at 10:41 PM Masahiko Sawada > > wrote: > > > > > > The modified page.sql test could fail if the block size is more than > > > 8kB? > > > > That's right, but I

Re: Implementing Incremental View Maintenance

2019-01-31 Thread Yugo Nagata
On Tue, 1 Jan 2019 14:46:25 +0700 Nguyễn Trần Quốc Vinh wrote: > We have some result on incremental update for MVs. We generate triggers on > C to do the incremental maintenance. We posted the code to github about 1 > year ago, but unfortunately i posted a not-right ctrigger.h header. The >

Re: Statement-level rollback

2019-01-31 Thread Andres Freund
On 2018-12-08 17:55:03 -0300, Alvaro Herrera wrote: > On 2018-Dec-08, Andres Freund wrote: > > > On 2018-12-08 17:10:27 -0300, Alvaro Herrera wrote: > > > > This is what patch 0001 does -- it's only allowed in the connection > > > string, or on ALTER USER / ALTER DATABASE. Setting it in > > >

Re: WIP: Avoid creation of the free space map for small tables

2019-01-31 Thread Amit Kapila
On Thu, Jan 31, 2019 at 2:02 PM John Naylor wrote: > > On Thu, Jan 31, 2019 at 6:37 AM Amit Kapila wrote: > > > > On Wed, Jan 30, 2019 at 8:11 PM John Naylor > > wrote: > > > > > > That's probably a good idea to limit risk. I just very basic tests > > > now, and vacuum before every relation

Re: BUG #15589: Due to missing wal, restore ends prematurely and opens database for read/write

2019-01-31 Thread Kyotaro HORIGUCHI
At Wed, 30 Jan 2019 15:53:51 +, l...@lako.no wrote in > Hi > I have reported a bug via PostgreSQL bug report form, but havent got any > response so far. > This might not be a bug, but a feature not implemented yet. > I suggest to make a small addition to StartupXLOG to solve the issue. I

Re: [HACKERS] proposal: schema variables

2019-01-31 Thread Pavel Stehule
Hi just rebase regards Pavel schema-variables-20190131.patch.gz Description: application/gzip

Re: WIP Patch: Precalculate stable functions, infrastructure v1

2019-01-31 Thread Andres Freund
On 2018-11-29 18:00:15 +0100, Dmitry Dolgov wrote: > > On Tue, Oct 2, 2018 at 4:22 AM Michael Paquier wrote: > > > > On Thu, May 24, 2018 at 04:00:33PM +0300, Marina Polyakova wrote: > > > Here there's a 9-th version of the patches for the precalculation of > > > stable > > > or immutable

Re: Online enabling of checksums

2019-01-31 Thread Magnus Hagander
On Thu, Jan 31, 2019 at 11:57 AM Andres Freund wrote: > On 2018-09-30 10:48:36 +0200, Tomas Vondra wrote: > > > > > > On 09/29/2018 06:51 PM, Stephen Frost wrote: > > > Greetings, > > > > > > * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: > > >> On 09/29/2018 02:19 PM, Stephen Frost wrote:

Re: POC: GROUP BY optimization

2019-01-31 Thread Andres Freund
On 2018-11-29 17:56:53 +0100, Dmitry Dolgov wrote: > > On Tue, Oct 2, 2018 at 4:16 AM Michael Paquier wrote: > > > > On Sat, Jun 30, 2018 at 09:19:13AM +1200, Gavin Flower wrote: > > > Additionally put an upper limit threshold on the number of combinations to > > > check, fairly large by default?

Re: cost_sort() improvements

2019-01-31 Thread Andres Freund
On 2018-11-29 17:53:31 +0100, Dmitry Dolgov wrote: > > On Tue, Oct 2, 2018 at 3:58 AM Michael Paquier wrote: > > > > On Sun, Jul 22, 2018 at 10:22:10PM +0200, Tomas Vondra wrote: > > > Could you perhaps summarize the reasoning or at least point me to the > > > relevant parts of the sources, so

Re: Sample values for pg_stat_statements

2019-01-31 Thread Andres Freund
On 2018-11-29 16:58:05 +0100, Dmitry Dolgov wrote: > > On Mon, Oct 1, 2018 at 8:30 AM Michael Paquier wrote: > > > > On Tue, Apr 17, 2018 at 05:58:44PM +0200, Vik Fearing wrote: > > > I think I handle that well enough with permission checking, but I'm open > > > to more debate on it. > > > > The

Re: Implementing SQL ASSERTION

2019-01-31 Thread Andres Freund
Hi, On 2018-11-29 16:54:14 +0100, Dmitry Dolgov wrote: > > On Tue, Sep 25, 2018 at 1:04 AM Joe Wildish > > wrote: > > > > All agreed. I’ll give the patch some TLC and get a new version that > > addresses the above. > > Hi, > > Just a reminder, that the patch still needs to be rebased, could

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

2019-01-31 Thread Andres Freund
On 2018-11-29 14:27:50 +0100, Dmitry Dolgov wrote: > > On Fri, Sep 21, 2018 at 5:52 AM Andrey Lepikhov > > wrote: > > > > The v6 version of quick vacuum, which utilizes the amtargetdelete() > > interface for retail indextuple deletion. > > Now it is more simple and laconic. > > It must be

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2019-01-31 Thread Andres Freund
Hi, On 2018-11-29 13:45:15 +0100, Dmitry Dolgov wrote: > > On Fri, Aug 24, 2018 at 5:53 PM Alexander Korotkov > > wrote: > > > > Given I've no feedback on this idea yet, I'll try to implement a PoC > > patch for that. It doesn't look to be difficult. And we'll see how > > does it work. > >

Re: Connection slots reserved for replication

2019-01-31 Thread Oleksii Kliukin
> On 31. Jan 2019, at 11:50, Petr Jelinek wrote: > > On 31/01/2019 11:25, Oleksii Kliukin wrote: >> >> >>> On 25. Jan 2019, at 18:37, Oleksii Kliukin >> > wrote: >>> >>> Hello, >>> On 24. Jan 2019, at 13:47, Kyotaro HORIGUCHI >>>

bug tracking system

2019-01-31 Thread Alvaro Herrera
Here's a bug tracking system that Nathan set up many years ago and apparently has kept going unattended. It seems to me that it's something that we could base a semi-official bug tracking system on. https://granicus.if.org/pgbugs/ There are clearly things that need fixed, such as failure to

Re: Online enabling of checksums

2019-01-31 Thread Andres Freund
On 2018-09-30 10:48:36 +0200, Tomas Vondra wrote: > > > On 09/29/2018 06:51 PM, Stephen Frost wrote: > > Greetings, > > > > * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: > >> On 09/29/2018 02:19 PM, Stephen Frost wrote: > >>> * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: >

Re: Connection slots reserved for replication

2019-01-31 Thread Petr Jelinek
On 31/01/2019 11:25, Oleksii Kliukin wrote: > > >> On 25. Jan 2019, at 18:37, Oleksii Kliukin > > wrote: >> >> Hello, >> >>> On 24. Jan 2019, at 13:47, Kyotaro HORIGUCHI >>> >> > wrote: >> >> Thank you for the review.I took a

Re: Connection slots reserved for replication

2019-01-31 Thread Oleksii Kliukin
> On 25. Jan 2019, at 18:37, Oleksii Kliukin wrote: > > Hello, > >> On 24. Jan 2019, at 13:47, Kyotaro HORIGUCHI >> mailto:horiguchi.kyot...@lab.ntt.co.jp>> >> wrote: > > Thank you for the review.I took a liberty to address it with v9. So, given there are no further feedback or

Re: [HACKERS] Transactions involving multiple postgres foreign servers, take 2

2019-01-31 Thread Masahiko Sawada
On Tue, Jan 29, 2019 at 5:47 PM Ildar Musin wrote: > > Hello, > > The patch needs rebase as it doesn't apply to the current master. I applied it > to the older commit to test it. It worked fine so far. Thank you for testing the patch! > > I found one bug though which would cause resolver to

Re: Pluggable Storage - Andres's take

2019-01-31 Thread Amit Khandekar
Hi, Attached is a patch that adds some test scenarios for testing the dependency of various object types on table am. Besides simple tables, it considers materialized views, partitioned table, foreign table, and composite types, and verifies that the dependency is created only for those object

RE: libpq debug log

2019-01-31 Thread Iwata, Aya
Hi Nagaura-san, Thank you for your review and advice. > This merit was very helpful for my use, so I want your proposal function in > postgres. Thank you.  > 1) > It would be better making the log format the same as the server log format, > I think. > Your log format: > 2019/01/22

  1   2   >