Re: BUG #15641: Autoprewarm worker fails to start on Windows with huge pages in use Old PostgreSQL community/pgsql-bugs x

2019-03-18 Thread Mithun Cy
t tOn Mon, Feb 25, 2019 at 12:10 AM Mithun Cy wrote: > Thanks Hans, for a simple reproducible tests. > > The "worker.bgw_restart_time" is never set for autoprewarm workers so on > error it get restarted after some period of time (default behavior). Since > database itself is dropped our attempt

Re: Online verification of checksums

2019-03-18 Thread Michael Banck
Hi, Am Montag, den 18.03.2019, 02:38 -0400 schrieb Stephen Frost: > * Michael Paquier (mich...@paquier.xyz) wrote: > > On Mon, Mar 18, 2019 at 01:43:08AM -0400, Stephen Frost wrote: > > > To be clear, I agree completely that we don't want to be reporting false > > > positives or "this might mean c

RE: SQL statement PREPARE does not work in ECPG

2019-03-18 Thread Matsumura, Ryo
Meskes-san Thank you for your comment. > One question though, why is the statement name always quoted? Do we > really need that? Seems to be more of a hassle than and advantage. The following can be accepted by preproc, ecpglib, libpq, and backend in previous versions. exec sql prepare "st x"

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Magnus Hagander
On Mon, Mar 18, 2019 at 7:08 AM Stephen Frost wrote: > Greetings, > > * Robert Haas (robertmh...@gmail.com) wrote: > > On Thu, Mar 14, 2019 at 7:34 PM Peter Eisentraut > > wrote: > > > I think the potential problems of getting this wrong are bigger than > the > > > issue we are trying to fix. >

Re: Online verification of checksums

2019-03-18 Thread Michael Paquier
On Mon, Mar 18, 2019 at 02:38:10AM -0400, Stephen Frost wrote: > Uh, we are, of course, going to have partial reads- we just need to > handle them appropriately, and that's not hard to do in a way that we > never have false positives. Ere, my apologies here. I meant the read of a torn page, not a

Re: Online verification of checksums

2019-03-18 Thread Stephen Frost
Greetings, * Michael Banck (michael.ba...@credativ.de) wrote: > Am Montag, den 18.03.2019, 02:38 -0400 schrieb Stephen Frost: > > * Michael Paquier (mich...@paquier.xyz) wrote: > > > On Mon, Mar 18, 2019 at 01:43:08AM -0400, Stephen Frost wrote: > > > > To be clear, I agree completely that we don'

Re: Online verification of checksums

2019-03-18 Thread Stephen Frost
Greetings, * Michael Paquier (mich...@paquier.xyz) wrote: > On Mon, Mar 18, 2019 at 02:38:10AM -0400, Stephen Frost wrote: > > Uh, we are, of course, going to have partial reads- we just need to > > handle them appropriately, and that's not hard to do in a way that we > > never have false positive

Re: Online verification of checksums

2019-03-18 Thread Michael Banck
Hi, Am Montag, den 18.03.2019, 08:18 +0100 schrieb Michael Banck: > I have now rebased that patch on top of the pg_verify_checksums -> > pg_checksums renaming, see attached. Sorry, I had missed some hunks in the TAP tests, fixed-up patch attached. Michael -- Michael Banck Projektleiter / Seni

Re: Data-only pg_rewind, take 2

2019-03-18 Thread Chris Travers
On Mon, Mar 18, 2019 at 4:09 AM Michael Paquier wrote: > On Sun, Mar 17, 2019 at 09:00:57PM +0800, Chris Travers wrote: > > I also added test cases and some docs. I don't know if the docs are > > sufficient. Feedback is appreciated. > > To be honest, I don't think that this approach is a good i

Re: Online verification of checksums

2019-03-18 Thread Michael Banck
Hi. Am Montag, den 18.03.2019, 03:34 -0400 schrieb Stephen Frost: > * Michael Banck (michael.ba...@credativ.de) wrote: > > Am Montag, den 18.03.2019, 02:38 -0400 schrieb Stephen Frost: > > > * Michael Paquier (mich...@paquier.xyz) wrote: > > > > On Mon, Mar 18, 2019 at 01:43:08AM -0400, Stephen Fr

Re: [PATCH] get rid of StdRdOptions, use individual binary reloptions representation for each relation kind instead

2019-03-18 Thread Kyotaro HORIGUCHI
Hello. At Mon, 18 Mar 2019 03:03:04 +, "Iwata, Aya" wrote in <71E660EB361DF14299875B198D4CE5423DF05777@g01jpexmbkw25> > This patch does not apply. Please refer to http://commitfest.cputube.org/ > and update it. > How about separating your patch by feature or units that can be phased commit

Re: Online verification of checksums

2019-03-18 Thread Stephen Frost
Greetings, On Mon, Mar 18, 2019 at 15:52 Michael Banck wrote: > Hi. > > Am Montag, den 18.03.2019, 03:34 -0400 schrieb Stephen Frost: > > * Michael Banck (michael.ba...@credativ.de) wrote: > > > Am Montag, den 18.03.2019, 02:38 -0400 schrieb Stephen Frost: > > > > * Michael Paquier (mich...@paqu

Re: Offline enabling/disabling of data checksums

2019-03-18 Thread Michael Paquier
On Fri, Mar 15, 2019 at 01:37:27PM +0100, Michael Banck wrote: > Am Freitag, den 15.03.2019, 21:23 +0900 schrieb Michael Paquier: >> Perhaps having them under --verbose makes more sense? > > Well if we think it is essential in order to tell the user what happened > in the case of an error, it shou

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Michael Paquier
On Mon, Mar 18, 2019 at 08:32:44AM +0100, Magnus Hagander wrote: > On Mon, Mar 18, 2019 at 7:08 AM Stephen Frost wrote: >> I definitely think that we should add an option to allow the user to >> tell us explicitly what they want here, even if we also go based on what >> the created directory has (

Re: partitioned tables referenced by FKs

2019-03-18 Thread Amit Langote
Hi, On 2019/03/15 2:31, Alvaro Herrera wrote: > Once I was finished, fixed bugs and tested it, I realized that that was > a stupid thing to have done -- because THOSE ARE DIFFERENT CONSTRAINTS. > When you say "fk (a) references pk1" you're saying that all the values > in fk(a) must appear in pk1.

Re: Parallel query vs smart shutdown and Postmaster death

2019-03-18 Thread Arseny Sher
Thomas Munro writes: > Just a thought: instead of the new hand-coded loop you added in > pmdie(), do you think it would make sense to have a new argument > "exclude_class_mask" for SignalSomeChildren()? If we did that, I > would consider renaming the existing parameter "target" to > "include_ty

Re: Tid scan improvements

2019-03-18 Thread David Rowley
On Fri, 15 Mar 2019 at 18:42, Edmund Horner wrote: > I've had to adapt it to use the table scan API. I've got it compiling > and passing tests, but I'm uneasy about some things that still use the > heapam API. > > 1. I call heap_setscanlimits as I'm not sure there is a tableam equivalent. > 2. I'

Re: Problem with default partition pruning

2019-03-18 Thread Amit Langote
Hosoya-san, On 2019/03/15 15:05, Yuzuko Hosoya wrote: > Indeed, it's problematic. I also did test and I found that > this problem was occurred when any partition didn't match > WHERE clauses. So following query didn't work correctly. > > # explain select * from test1_3 where (id > 0 and id <

Re: speeding up planning with partitions

2019-03-18 Thread Amit Langote
Imai-san, On 2019/03/15 14:40, Imai, Yoshikazu wrote: > Amit-san, > > I have another little comments about v31-patches. > > * We don't need is_first_child in inheritance_planner(). > > On Fri, Mar 8, 2019 at 9:18 AM, Amit Langote wrote: >> On 2019/03/08 16:16, Imai, Yoshikazu wrote: >>> I attac

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Kyotaro HORIGUCHI
Hello. At Mon, 18 Mar 2019 11:54:42 +0900, Masahiko Sawada wrote in > Here is the performance test results. I've setup a 500MB table with > several indexes and made 10% of table dirty before each vacuum. > Compared execution time of the patched postgrse with the current HEAD > (at 'speed_up' co

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Kyotaro HORIGUCHI
At Mon, 18 Mar 2019 17:16:01 +0900, Michael Paquier wrote in <20190318081601.gi1...@paquier.xyz> > On Mon, Mar 18, 2019 at 08:32:44AM +0100, Magnus Hagander wrote: > > On Mon, Mar 18, 2019 at 7:08 AM Stephen Frost wrote: > >> I definitely think that we should add an option to allow the user to >

Re: chained transactions

2019-03-18 Thread Peter Eisentraut
Updated patch. I have squashed the two previously separate patches together in this one. On 2019-01-06 15:14, Fabien COELHO wrote: > I do not understand the value of the SAVEPOINT in the tests. The purpose of the SAVEPOINT in the test is because it exercises different switch cases in CommitTrans

Re: chained transactions

2019-03-18 Thread Peter Eisentraut
On 2019-02-16 06:22, Andres Freund wrote: >> +static int save_XactIsoLevel; >> +static bool save_XactReadOnly; >> +static bool save_XactDeferrable; > > We normally don't define variables in the middle of a file? Also, why > do these need to be global vars rather than defined where we do > chaini

Re: explain plans with information about (modified) gucs

2019-03-18 Thread Rafia Sabih
On Sun, 24 Feb 2019 at 00:06, Tomas Vondra wrote: > > Hi, > > attached is an updated patch, fixing and slightly tweaking the docs. > > > Barring objections, I'll get this committed later next week. > I was having a look at this patch, and this kept me wondering, +static void +ExplainShowSettings(

Re: [HACKERS] CLUSTER command progress monitor

2019-03-18 Thread Rafia Sabih
On Fri, 8 Mar 2019 at 09:14, Tatsuro Yamada wrote: > > On 2019/03/06 15:38, Tatsuro Yamada wrote: > > On 2019/03/05 17:56, Tatsuro Yamada wrote: > >> On 2019/03/05 11:35, Robert Haas wrote: > >>> On Mon, Mar 4, 2019 at 5:38 AM Tatsuro Yamada > >>> wrote: > === Current design === > > >>>

Re: Add exclusive backup deprecation notes to documentation

2019-03-18 Thread Peter Eisentraut
On 2019-03-07 10:33, David Steele wrote: > On 3/1/19 3:14 PM, Laurenz Albe wrote: >> Magnus Hagander wrote: >>> Maybe have the first note say "This method is deprecated bceause it has >>> serious >>> risks (see bellow)" and then list the actual risks at the end? >> >> Good idea. That may attract

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Peter Eisentraut
On 2019-03-16 15:29, Robert Haas wrote: > Another option would be to provide a pg_basebackup option to allow the > user to specify what they intended i.e. --[no-]group-read. (Tying it > to -R doesn't sound like a good decision to me.) I was actually surprised to learn how it works right now. I

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Peter Eisentraut
On 2019-03-18 08:32, Magnus Hagander wrote: > Going based on the current setting of the directory seems defensible to > me, with the argument of "we trust you created the directory the way you > want the rest of the system to be". > > > Which I believe is also how a plain unix cp (or

Re: Unaccent extension python script Issue in Windows

2019-03-18 Thread Hugh Ranalli
On Mon, 18 Mar 2019 at 01:14, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > This patch contains irrelevant changes. The minimal required > change would be the attached. If you want refacotor the > UnicodeData reader or rearrange import sutff, it should be > separate patches. > I'm

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 4:16 AM Michael Paquier wrote: > On Mon, Mar 18, 2019 at 08:32:44AM +0100, Magnus Hagander wrote: > > On Mon, Mar 18, 2019 at 7:08 AM Stephen Frost wrote: > >> I definitely think that we should add an option to allow the user to > >> tell us explicitly what they want here,

Re: partitioned tables referenced by FKs

2019-03-18 Thread Alvaro Herrera
Hi Amit On 2019-Mar-18, Amit Langote wrote: > On 2019/03/15 2:31, Alvaro Herrera wrote: > > Once I was finished, fixed bugs and tested it, I realized that that was > > a stupid thing to have done -- because THOSE ARE DIFFERENT CONSTRAINTS. > > When you say "fk (a) references pk1" you're saying th

Re: Possible to modify query language in an extension?

2019-03-18 Thread Robert Haas
On Sun, Mar 17, 2019 at 12:21 AM Tom Lane wrote: > Chris Cleveland writes: > > I'd like to add some keywords/clauses to the SELECT statement. > > Yeah, you'll have to modify gram.y (and a pile of other places) > if you want to do that. That's certainly something we do all > the time, but bison d

Re: Timeout parameters

2019-03-18 Thread Robert Haas
On Sun, Mar 17, 2019 at 9:08 PM Jamison, Kirk wrote: > The main argument here is about the security risk of allowing socket timeout > to cancel valid connections, right? I don't think so. I think it's just a weirdly-design parameter without a really compelling use case. Enforcing limits on the

Re: Compressed TOAST Slicing

2019-03-18 Thread Tom Lane
Stephen Frost writes: > * Andres Freund (and...@anarazel.de) wrote: >> I don't think that should stop us from breaking the API. You've got to >> do quite low level stuff to need pglz directly, in which case such an >> API change should be the least of your problems between major versions. > Agree

Re: [HACKERS] generated columns

2019-03-18 Thread Pavel Stehule
Hi po 18. 3. 2019 v 8:35 odesílatel Peter Eisentraut < peter.eisentr...@2ndquadrant.com> napsal: > Here is an updated patch with just the "stored" functionality, as > discussed. > > The actual functionality is much smaller now, contained in the executor. > Everything else is mostly DDL support,

Re: Compressed TOAST Slicing

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 10:14 AM Tom Lane wrote: > Stephen Frost writes: > > * Andres Freund (and...@anarazel.de) wrote: > >> I don't think that should stop us from breaking the API. You've got to > >> do quite low level stuff to need pglz directly, in which case such an > >> API change should be

Re: Unduly short fuse in RequestCheckpoint

2019-03-18 Thread Robert Haas
On Sun, Mar 17, 2019 at 3:41 PM Tom Lane wrote: > So I think we should just blow off that > hypothetical possibility and do it like this. Makes sense to me. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Compressed TOAST Slicing

2019-03-18 Thread Paul Ramsey
> On Mar 18, 2019, at 7:34 AM, Robert Haas wrote: > > On Mon, Mar 18, 2019 at 10:14 AM Tom Lane wrote: >> Stephen Frost writes: >>> * Andres Freund (and...@anarazel.de) wrote: I don't think that should stop us from breaking the API. You've got to do quite low level stuff to need pgl

Re: BUG #15641: Autoprewarm worker fails to start on Windows with huge pages in use Old PostgreSQL community/pgsql-bugs x

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 3:04 AM Mithun Cy wrote: > autoprewarm waorker should not be restarted. As per the code > @apw_start_database_worker@ master starts a worker per database and wait > until it exit by calling WaitForBackgroundWorkerShutdown. The call > WaitForBackgroundWorkerShutdown cann

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Peter Eisentraut
On 2019-03-18 14:47, Robert Haas wrote: >> Based on the feedback gathered, having a separate option to enforce >> the default and not touching the behavior implemented until now, >> sounds fine to me. > That's not what I'm proposing. I think the behavior implemented until > now is not best, becaus

Re: pg_basebackup ignores the existing data directory permissions

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 11:36 AM Peter Eisentraut wrote: > On 2019-03-18 14:47, Robert Haas wrote: > >> Based on the feedback gathered, having a separate option to enforce > >> the default and not touching the behavior implemented until now, > >> sounds fine to me. > > That's not what I'm proposin

Re: Add exclusive backup deprecation notes to documentation

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 8:33 AM Peter Eisentraut wrote: > The documentation changes appear to continue the theme from the other > thread that the exclusive backup mode is terrible and everyone should > feel bad about it. I don't think there is consensus about that. +1. -- Robert Haas Enterpris

Re: [HACKERS] Custom compression methods

2019-03-18 Thread Ildar Musin
Hi Ildus, On Fri, Mar 15, 2019 at 12:52 PM Ildus Kurbangaliev < i.kurbangal...@gmail.com> wrote: > > Hi, > in my opinion this patch is usually skipped not because it is not > needed, but because of its size. It is not hard to maintain it until > commiters will have time for it or I will get actua

Concurrency bug with vacuum full (cluster) and toast

2019-03-18 Thread Alexander Korotkov
Hi all, I've discovered bug, when vacuum full fails with error, because it couldn't find toast chunks deleted by itself. That happens because cluster_rel() sets OldestXmin, but toast accesses gets snapshot later and independently. That causes heap_page_prune_opt() to clean chunks, which rebuild_

Re: Fix optimization of foreign-key on update actions

2019-03-18 Thread Peter Eisentraut
On 2019-03-11 12:57, Peter Eisentraut wrote: > On 2019-02-06 23:15, Peter Eisentraut wrote: >> On 05/02/2019 17:20, Tom Lane wrote: >>> What I *don't* like about the proposed patch is that it installs a >>> new, different comparison rule for the ON UPDATE CASCADE case only. >>> If we were to go in

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

2019-03-18 Thread Peter Geoghegan
On Mon, Mar 18, 2019 at 4:59 AM Heikki Linnakangas wrote: > I'm getting a regression failure from the 'create_table' test with this: > Are you seeing that? Yes -- though the bug is in your revised v18, not the original v18, which passed CFTester. Your revision fails on Travis/Linux, which is pre

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2019-03-18 Thread Yun Li
Thanks a lot for really good points!! I did not expected I will get this many points of view. :P I have identical experience with Robert when other extension calculate the id different as PGSS, PGSS will overwritten that id when it is on. But Tom got a point that if we centralize the logic that pg

Re: Fix XML handling with DOCTYPE

2019-03-18 Thread Chapman Flack
There might be too many different email threads on this with patches, but in case it went under the radar, xml-content-2006-3.patch appeared in my previous message on this thread[1]. It is based on a simple pre-check of the prefix of the input, determining which form of parse to apply. That may or

Re: BUG #15641: Autoprewarm worker fails to start on Windows with huge pages in use Old PostgreSQL community/pgsql-bugs x

2019-03-18 Thread Mithun Cy
Thanks Robert, On Mon, Mar 18, 2019 at 9:01 PM Robert Haas wrote: > On Mon, Mar 18, 2019 at 3:04 AM Mithun Cy wrote: > > autoprewarm waorker should not be restarted. As per the code > @apw_start_database_worker@ master starts a worker per database and wait > until it exit by calling WaitForBackg

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Robert Haas
On Thu, Mar 14, 2019 at 3:37 AM Masahiko Sawada wrote: > BTW your patch seems to not apply to the current HEAD cleanly and to > need to update the comment of vacuum(). Yeah, I omitted some hunks by being stupid with 'git'. Since you seem to like the approach, I put back the hunks I intended to h

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2019-03-18 Thread Nikolay Samokhvalov
Hello On Sat, Mar 16, 2019 at 7:32 AM Robert Haas wrote: > Also, I think this is now the third independent request to expose > query ID in pg_stat_statements. I think we should give the people > what they want. > Count me as the 4th. This would be a very important feature for automated query

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2019-03-18 Thread Julien Rouhaud
On Mon, Mar 18, 2019 at 6:23 PM Yun Li wrote: > > Let's take one step back. Since queryId is stored in core as Julien pointed > out, can we just add that global to the pg_stat_get_activity and ultimately > exposed in pg_stat_activity view? Then no matter whether PGSS is on or off, > or however

Re: jsonpath

2019-03-18 Thread Tom Lane
Just another minor bitch about this patch: jsonpath_scan.l has introduced a typedef called "keyword". This is causing pgindent to produce seriously ugly results in libpq, and probably in other places where that is used as a field or variable name. Please rename that typedef to something less gene

Re: Row Level Security − leakproof-ness and performance implications

2019-03-18 Thread Peter Eisentraut
On 2019-02-21 15:56, Pierre Ducroquet wrote: > I undestand these decisions, but it makes RLS quite fragile, with numerous un- > documented side-effects. In order to save difficulties from future users, I > wrote this patch to the documentation, listing the biggest restrictions I hit > with RLS so

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Robert Haas
On Thu, Mar 14, 2019 at 3:37 AM Masahiko Sawada wrote: > Attached the updated patch you proposed and the patch that converts > the grammer productions for the VACUUM option on top of the former > patch. The latter patch moves VacuumOption to vacuum.h since the > parser no longer needs such informa

Re: BUG #15641: Autoprewarm worker fails to start on Windows with huge pages in use Old PostgreSQL community/pgsql-bugs x

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 1:43 PM Mithun Cy wrote: >> Does that sound right? > > -- Yes I Agree. Committed with a little more tweaking of the commit message, and back-patched to v11. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

[PATCH] src/test/modules/dummy_index -- way to test reloptions from inside of access method

2019-03-18 Thread Nikolay Shaplov
Hi! This patch introduce a dummy_index access method module, that does not do any indexing at all, but allow to test reloptions from inside of access method extension. This patch is part of my bigger work on reloptions refactoring. It came from https://www.postgresql.org/message-id/2019022006

Re: Speed up transaction completion faster after many relations are accessed in a transaction

2019-03-18 Thread Peter Eisentraut
On 2019-02-20 07:20, Tsunakawa, Takayuki wrote: > From: Tom Lane [mailto:t...@sss.pgh.pa.us] >> Hm. Putting a list header for a purely-local data structure into shared >> memory seems quite ugly. Isn't there a better place to keep that? > > Agreed. I put it in the global variable. I think ther

Re: jsonpath

2019-03-18 Thread Alexander Korotkov
On Mon, Mar 18, 2019 at 10:08 PM Tom Lane wrote: > Just another minor bitch about this patch: jsonpath_scan.l has introduced > a typedef called "keyword". This is causing pgindent to produce seriously > ugly results in libpq, and probably in other places where that is used as > a field or variabl

Re: Row Level Security − leakproof-ness and performance implications

2019-03-18 Thread Peter Eisentraut
On 2019-02-28 00:03, Joe Conway wrote: > What if we provided an option to redact all client messages (leaving > logged messages as-is). Separately we could provide a GUC to force all > functions to be resolved as leakproof. Depending on your requirements, > having both options turned on could be pe

Re: [PATCH][PROPOSAL] Add enum releation option type

2019-03-18 Thread Nikolay Shaplov
В письме от среда, 20 февраля 2019 г. 15:08:32 MSK пользователь Michael Paquier написал: > > 2.5 May be this src/test/modules dummy index is subject to another patch. > > So I will start working on it right now, but we will do this work not > > dependent to any other patches. And just add there

Re: Online verification of checksums

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 2:06 AM Michael Paquier wrote: > The mentions on this thread that the server has all the facility in > place to properly lock a buffer and make sure that a partial read > *never* happens and that we *never* have any kind of false positives, > directly preventing the set of

Re: Rare SSL failures on eelpout

2019-03-18 Thread Tom Lane
I wrote: > ... I don't like pqHandleSendFailure all that much: it has strong > constraints on what state libpq has to be in, as a consequence of which > it's called from a bunch of ad-hoc places, and can't be called from > some others. It's kind of accidental that it will work here. > I was toying

Re: Row Level Security − leakproof-ness and performance implications

2019-03-18 Thread Joe Conway
On 3/18/19 3:52 PM, Peter Eisentraut wrote: > On 2019-02-28 00:03, Joe Conway wrote: >> What if we provided an option to redact all client messages (leaving >> logged messages as-is). Separately we could provide a GUC to force all >> functions to be resolved as leakproof. Depending on your requirem

Re: Online verification of checksums

2019-03-18 Thread Michael Banck
Hi, Am Montag, den 18.03.2019, 16:11 +0800 schrieb Stephen Frost: > On Mon, Mar 18, 2019 at 15:52 Michael Banck wrote: > > Am Montag, den 18.03.2019, 03:34 -0400 schrieb Stephen Frost: > > > Thanks for that.  Reading through the code though, I don't entirely > > > understand why we're making thin

Re: outdated reference to tuple header OIDs

2019-03-18 Thread Andres Freund
Hi, On 2019-03-14 15:49:40 +0800, John Naylor wrote: > It seems this is a leftover from commit 578b229718e8. Patch attached. Thanks for noticing. Pushed. Greetings, Andres Freund

Re: chained transactions

2019-03-18 Thread Fabien COELHO
Hallo Peter, Updated patch. I have squashed the two previously separate patches together in this one. Ok. I do not understand the value of the SAVEPOINT in the tests. The purpose of the SAVEPOINT in the test is because it exercises different switch cases in CommitTransactionCommand() an

Re: jsonpath

2019-03-18 Thread Tom Lane
Alexander Korotkov writes: > On Mon, Mar 18, 2019 at 10:08 PM Tom Lane wrote: >> Just another minor bitch about this patch: jsonpath_scan.l has introduced >> a typedef called "keyword". This is causing pgindent to produce seriously >> ugly results in libpq, and probably in other places where tha

Re: jsonpath

2019-03-18 Thread Pavel Stehule
po 18. 3. 2019 v 21:23 odesílatel Tom Lane napsal: > Alexander Korotkov writes: > > On Mon, Mar 18, 2019 at 10:08 PM Tom Lane wrote: > >> Just another minor bitch about this patch: jsonpath_scan.l has > introduced > >> a typedef called "keyword". This is causing pgindent to produce > seriously

Re: [PATCH] remove repetitive characters in fdwhandler.sgml

2019-03-18 Thread Andres Freund
On 2019-03-12 23:19:23 -0700, Andres Freund wrote: > On 2019-03-13 14:55:59 +0900, Etsuro Fujita wrote: > > (2019/03/13 14:02), Michael Paquier wrote: > > > On Tue, Mar 12, 2019 at 01:37:04AM +, Zhang, Jie wrote: > > > > Here is a tiny patch removing repetitive characters [if] in > > > > fdwha

Re: partitioned tables referenced by FKs

2019-03-18 Thread Alvaro Herrera
Hi Jesper On 2019-Mar-01, Jesper Pedersen wrote: > I'm getting a failure in the pg_upgrade test: > > -- > +-- Name: pk5 pk5_pkey; Type: CONSTRAINT; Schema: regress_fk; Owner: > jpedersen > +-- > + > +ALTER TABLE ONLY regress_fk.pk5 > +ADD CONSTRAINT pk5_pkey PRIMARY KEY (a); > + > + > +-- >

Re: Progress reporting for pg_verify_checksums

2019-03-18 Thread Michael Banck
Hi, thanks for the additional review! Am Donnerstag, den 14.03.2019, 11:54 +0900 schrieb Kyotaro HORIGUCHI: > At Wed, 13 Mar 2019 16:25:15 +0900, Michael Paquier > wrote in <20190313072515.gb2...@paquier.xyz> > > On Wed, Mar 13, 2019 at 07:22:28AM +0100, Fabien COELHO wrote: > > > Does not appl

Re: Online verification of checksums

2019-03-18 Thread Stephen Frost
Greetings, On Tue, Mar 19, 2019 at 04:15 Michael Banck wrote: > Am Montag, den 18.03.2019, 16:11 +0800 schrieb Stephen Frost: > > On Mon, Mar 18, 2019 at 15:52 Michael Banck > wrote: > > > Am Montag, den 18.03.2019, 03:34 -0400 schrieb Stephen Frost: > > > > Thanks for that. Reading through th

Re: partitioned tables referenced by FKs

2019-03-18 Thread Alvaro Herrera
On 2019-Feb-28, Amit Langote wrote: > I'd like to hear your thoughts on some suggestions to alter the structure > of the reorganized code around foreign key addition/cloning. With this > patch adding support for foreign keys to reference partitioned tables, the > code now has to consider various

Re: [HACKERS] Custom compression methods

2019-03-18 Thread Tomas Vondra
On 3/15/19 12:52 PM, Ildus Kurbangaliev wrote: > On Fri, 15 Mar 2019 14:07:14 +0400 > David Steele wrote: > >> On 3/7/19 11:50 AM, Alexander Korotkov wrote: >>> On Thu, Mar 7, 2019 at 10:43 AM David Steele >> > wrote: >>> >>> On 2/28/19 5:44 PM, Ildus Kurbangali

Re: Progress reporting for pg_verify_checksums

2019-03-18 Thread Fabien COELHO
I have rebased it now. Thanks. Will look at it. If the all of aboves are involved, the line would look as the follows. [=== ] ( 63% of 12.53 GB, 179 MB/s, ETC 26s) # Note that this is just an opinion. (pg_checksum runs fast at the beginning so ETC behaves s

Re: What to name the current heap after pluggable storage / what to rename?

2019-03-18 Thread Andres Freund
Hi, On 2019-03-13 08:29:47 -0400, Robert Haas wrote: > On Tue, Mar 12, 2019 at 8:39 PM Andres Freund wrote: > > > I like that option. > > > > In that vein, does anybody have an opinion about the naming of > > a) HeapUpdateFailureData, which will be used for different AMs > > b) HTSU_Result itself

Re: Rare SSL failures on eelpout

2019-03-18 Thread Thomas Munro
On Tue, Mar 19, 2019 at 9:11 AM Tom Lane wrote: > I wrote: > > ... I don't like pqHandleSendFailure all that much: it has strong > > constraints on what state libpq has to be in, as a consequence of which > > it's called from a bunch of ad-hoc places, and can't be called from > > some others. It'

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

2019-03-18 Thread Peter Geoghegan
On Tue, Mar 12, 2019 at 11:40 AM Robert Haas wrote: > I think it's pretty clear that we have to view that as acceptable. I > mean, we could reduce contention even further by finding a way to make > indexes 40% larger, but I think it's clear that nobody wants that. > Now, maybe in the future we'll

pg_upgrade version checking questions

2019-03-18 Thread Tom Lane
While poking around trying to find an explanation for the pg_upgrade failure described here: https://www.postgresql.org/message-id/flat/CACmJi2JUhGo2ZxqDkh-EPHNjEN1ZA1S64uHLJFWHBhUuV4492w%40mail.gmail.com I noticed a few things that seem a bit fishy about pg_upgrade. I can't (yet) connect any of th

Re: Rare SSL failures on eelpout

2019-03-18 Thread Tom Lane
Thomas Munro writes: > On Tue, Mar 19, 2019 at 9:11 AM Tom Lane wrote: >> My current feeling is that this is OK to put in HEAD but I think the >> risk-reward ratio isn't very good for the back branches. Even with >> an OpenSSL version where this makes a difference, the problematic >> behavior is

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

2019-03-18 Thread Robert Haas
On Mon, Mar 18, 2019 at 7:34 PM Peter Geoghegan wrote: > With pgbench scale factor 20, here are results for patch and master > with a Gaussian distribution on my 8 thread/4 core home server, with > each run reported lasting 10 minutes, repeating twice for client > counts 1, 2, 8, 16, and 64, patch

Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT

2019-03-18 Thread Matheus de Oliveira
On Sun, Feb 3, 2019 at 8:28 AM Andres Freund wrote: > > > > > It compiled, worked as expected, but some tests broke executing make > check: > > > > test create_table ... FAILED > > constraints ... FAILED > > inherit ... FAILED > >

Re: Progress reporting for pg_verify_checksums

2019-03-18 Thread Kyotaro HORIGUCHI
Hello. At Mon, 18 Mar 2019 23:14:01 +0100 (CET), Fabien COELHO wrote in > > > I have rebased it now. > > Thanks. Will look at it. > > >> If the all of aboves are involved, the line would look as the > >> follows. > >> > >> [=== ] ( 63% of 12.53 GB, 179 MB/s, >

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

2019-03-18 Thread Peter Geoghegan
On Mon, Mar 18, 2019 at 5:00 PM Robert Haas wrote: > Blech. I think the patch has enough other advantages that it's worth > accepting that, but it's not great. We seem to keep finding reasons > to reduce single client performance in the name of scalability, which > is often reasonable not but wo

Re: Rare SSL failures on eelpout

2019-03-18 Thread Thomas Munro
On Tue, Mar 19, 2019 at 12:25 PM Thomas Munro wrote: > 2. Linux, FreeBSD and Darwin gave slightly different error sequences > when writing after the remote connection was closed (though I suspect > they'd behave much the same way for a connection to a remote host), > but all allowed the "goodbye"

Re: Rare SSL failures on eelpout

2019-03-18 Thread Thomas Munro
On Tue, Mar 19, 2019 at 12:44 PM Tom Lane wrote: > Thomas Munro writes: > > Shouldn't we also back-patch the one-line change adding > > pqHandleSendFailure()? > > As I said before, I don't like that patch: at best it's an abuse of > pqHandleSendFailure, because that function is only meant to be c

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Masahiko Sawada
On Tue, Mar 19, 2019 at 3:05 AM Robert Haas wrote: > > On Thu, Mar 14, 2019 at 3:37 AM Masahiko Sawada wrote: > > BTW your patch seems to not apply to the current HEAD cleanly and to > > need to update the comment of vacuum(). > > Yeah, I omitted some hunks by being stupid with 'git'. > > Since y

Re: Rare SSL failures on eelpout

2019-03-18 Thread Tom Lane
Thomas Munro writes: > Yeah, now that we understand this properly I agree this is unlikely to > bother anyone in real life. I just want to make the build farm green. > I wondered about ssl_max_protocol_version = 'TLSv1.2', but that GUC's > too new. Yeah; also, forcing that would reduce our test

RE: speeding up planning with partitions

2019-03-18 Thread Imai, Yoshikazu
Amit-san, On Mon, Mar 18, 2019 at 9:56 AM, Amit Langote wrote: > On 2019/03/15 14:40, Imai, Yoshikazu wrote: > > Amit-san, > > > > I have another little comments about v31-patches. > > > > * We don't need is_first_child in inheritance_planner(). > > > > On Fri, Mar 8, 2019 at 9:18 AM, Amit Langote

Re: Libpq support to connect to standby server as priority

2019-03-18 Thread Haribabu Kommi
On Thu, Feb 28, 2019 at 1:00 PM Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: > From: Haribabu Kommi [mailto:kommi.harib...@gmail.com] > > Attached are the updated patches. > > Thanks, all look fixed. > > > > The target_server_type option yet to be implemented. > > Please let me rev

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Haribabu Kommi
On Mon, Mar 18, 2019 at 1:58 PM Masahiko Sawada wrote: > On Tue, Feb 26, 2019 at 7:20 PM Masahiko Sawada > wrote: > > > > On Tue, Feb 26, 2019 at 1:35 PM Haribabu Kommi > wrote: > > > > > > On Thu, Feb 14, 2019 at 9:17 PM Masahiko Sawada > wrote: > > >> > > >> Thank you. Attached the rebased p

Re: [HACKERS] CLUSTER command progress monitor

2019-03-18 Thread Tatsuro Yamada
Hi Rafia! On 2019/03/18 20:42, Rafia Sabih wrote: On Fri, 8 Mar 2019 at 09:14, Tatsuro Yamada wrote: Attached file is rebased patch on current HEAD. I changed a status. :) Looks like the patch needs a rebase. I was on the commit fb5806533f9fe0433290d84c9b019399cd69e9c2 PFA reject file in c

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

2019-03-18 Thread Peter Geoghegan
On Mon, Mar 18, 2019 at 5:12 PM Peter Geoghegan wrote: > Smarter choices on page splits pay off with higher client counts > because they reduce contention at likely hot points. It's kind of > crazy that the code in _bt_check_unique() sometimes has to move right, > while holding an exclusive buffer

Re: [HACKERS] CLUSTER command progress monitor

2019-03-18 Thread Tatsuro Yamada
On 2019/03/19 10:43, Tatsuro Yamada wrote: Hi Rafia! On 2019/03/18 20:42, Rafia Sabih wrote: On Fri, 8 Mar 2019 at 09:14, Tatsuro Yamada wrote: Attached file is rebased patch on current HEAD. I changed a status. :) Looks like the patch needs a rebase. I was on the commit fb5806533f9fe04332

extensions are hitting the ceiling

2019-03-18 Thread Eric Hanson
Hi folks, After months and years of really trying to make EXTENSIONs meet the requirements of my machinations, I have come to the conclusion that either a) I am missing something or b) they are architecturally flawed. Or possibly both. Admittedly, I might be trying to push extensions beyond what

Re: Problem with default partition pruning

2019-03-18 Thread Kyotaro HORIGUCHI
Hello. At Fri, 15 Mar 2019 17:30:07 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20190315.173007.147577546.horiguchi.kyot...@lab.ntt.co.jp> > The patch relies on the fact(?) that the lowest index is always > -1 in range partition and uses it as pseudo default > partition. I'm not su

RE: [HACKERS] Cached plans and statement generalization

2019-03-18 Thread Yamaji, Ryo
On Tue, Jan 29, 2019 at 10:46 AM, Konstantin Knizhnik wrote: > Rebased version of the patch is attached. I'm sorry for the late review. I confirmed behavior of autoprepare-12.patch. It is summarized below. ・parameter Expected behavior was shown according to the set value. However, I think that i

RE: Libpq support to connect to standby server as priority

2019-03-18 Thread Tsunakawa, Takayuki
From: Haribabu Kommi [mailto:kommi.harib...@gmail.com] > Target_session_attrs Target_server_type > > read-write prefer-slave, slave > > prefer-read master, slave > read-onlymaster, prefer-slave > > I know that some of the cas

Re: Add exclusive backup deprecation notes to documentation

2019-03-18 Thread Stephen Frost
Greetings, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 2019-03-07 10:33, David Steele wrote: > > On 3/1/19 3:14 PM, Laurenz Albe wrote: > >> Magnus Hagander wrote: > >>> Maybe have the first note say "This method is deprecated bceause it has > >>> serious > >>> risks (see be

  1   2   >