Re: Missing "Up" navigation link between parts and doc root?

2020-07-03 Thread Fabien COELHO
Hello Peter, The original stylesheets explicitly go out of their way to do it that way. We can easily fix that by removing that special case. See attached patch. That patch only fixes it for the header. To fix it for the footer as well, we'd first need to import the navfooter template to

Re: Missing "Up" navigation link between parts and doc root?

2020-07-03 Thread Fabien COELHO
The original stylesheets explicitly go out of their way to do it that way. Can we find any evidence of the reasoning? As you say, that clearly was an intentional choice. Given the code, my guess would be the well-intentioned but misplaced desire to avoid a redundancy, i.e. two links side-

Re: pgbench: option delaying queries till connections establishment?

2020-07-03 Thread Fabien COELHO
* First patch reworks time measurements in pgbench. * Second patch adds a barrier before starting the bench It applies on top of the previous one. The initial imbalance due to thread creation times is smoothed. The usecs patch fails to apply to HEAD, can you please submit a rebased version o

Re: min_safe_lsn column in pg_replication_slots view

2020-07-03 Thread Amit Kapila
On Wed, Jul 1, 2020 at 8:44 PM Alvaro Herrera wrote: > > On 2020-Jul-01, Amit Kapila wrote: > > > Okay, but do we think it is better to display this in > > pg_replication_slots or some new view like pg_stat_*_slots as being > > discussed in [1]? It should not happen that we later decide to move >

Re: A patch for get origin from commit_ts.

2020-07-03 Thread Movead Li
>Thanks. Movead, please note that the patch is waiting on author? >Could you send an update if you think that those changes make sense? Thanks for approval the issue, I will send a patch at Monday.  Regards, Highgo Software (Canada/China/Pakistan) URL : http://www.highgo.ca/ EMAIL: mailto

Re: proposal - psql - possibility to redirect only tabular output

2020-07-03 Thread Pavel Stehule
pá 3. 7. 2020 v 12:16 odesílatel Artur Zakirov napsal: > Hello, > > On Sat, Apr 11, 2020 at 6:20 PM Pavel Stehule > wrote: > > Main motivation for this patch is working with psql for writing and > editing queries, and browsing result in second terminal with pspg or any > other similar tool (tail

Re: track_planning causing performance regression

2020-07-03 Thread Pavel Stehule
pá 3. 7. 2020 v 13:02 odesílatel Fujii Masao napsal: > > > On 2020/07/03 16:02, Pavel Stehule wrote: > > > > > > pá 3. 7. 2020 v 8:57 odesílatel Fujii Masao > napsal: > > > > > > > > On 2020/07/03 13:05, Pavel Stehule wrote: > > > Hi > > > > >

Ideas about a better API for postgres_fdw remote estimates

2020-07-03 Thread Tom Lane
In <1116564.1593813...@sss.pgh.pa.us> I wrote: > I wonder whether someday we ought to invent a new API that's more > suited to postgres_fdw's needs than EXPLAIN is. It's not like the > remote planner doesn't know the number we want; it just fails to > include it in EXPLAIN. I've been thinking abo

avoid bitmapOR-ing indexes with scan condition inconsistent with partition constraint

2020-07-03 Thread Justin Pryzby
(resending to the list) Hi All I started looking into Konstantin's 30 month old thread/patch: |Re: [HACKERS] Secondary index access optimizations https://www.postgresql.org/message-id/27516421-5afa-203c-e22a-8407e9187327%40postgrespro.ru ..to which David directed me 12 months ago: |Subject: Re:

Re: estimation problems for DISTINCT ON with FDW

2020-07-03 Thread Tom Lane
Etsuro Fujita writes: > On Thu, Jul 2, 2020 at 11:46 PM Tom Lane wrote: >> We could perhaps try to make our own estimate of the selectivity of the >> shippable quals and then back into #1 from the value we got for #2 from >> the remote server. > Actually, that is what I suggested: > ... By "the

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Tom Lane
Magnus Hagander writes: > On Fri, Jul 3, 2020 at 7:06 PM Tom Lane wrote: >> Shouldn't that be inserting MyDatabaseTableSpace? I see no other places >> anywhere that are forcing temp stuff into pg_default like this. > Yeah, looking at it again, I think it should. I can't see any reason why it >

Re: pro pametniky -historie vzniku PL/SQL

2020-07-03 Thread Jonah H. Harris
On Fri, Jul 3, 2020 at 3:20 PM Pavel Stehule wrote: > Hi > > I am sorry, wrong mailing list. > Thanks for reading/sharing my blog post, regardless of the mailing list :) -- Jonah H. Harris

Re: Missing "Up" navigation link between parts and doc root?

2020-07-03 Thread Alvaro Herrera
On 2020-Jul-03, Tom Lane wrote: > Peter Eisentraut writes: > > On 2020-06-21 09:19, Fabien COELHO wrote: > >> I've been annoyed that the documentation navigation does not always has an > >> "Up" link. It has them inside parts, but the link disappears and you have > >> to go for the "Home" link wh

Re: Default setting for enable_hashagg_disk (hash_mem)

2020-07-03 Thread Alvaro Herrera
On 2020-Jul-03, Bruce Momjian wrote: > Well, the bottom line is that we are designing features during beta. Well, we're designing a way for users to interact the new feature. The feature itself is already in, and it works well in general terms. I expect that the new behavior is a win in the majo

Re: Inlining of couple of functions in pl_exec.c improves performance

2020-07-03 Thread Tom Lane
I did some performance testing on 0001+0002 here, and found that for me, there's basically no change on x86_64 but a win of 2 to 3 percent on aarch64, using Pavel's pi_est_1() as a representative case for simple plpgsql statements. That squares with your original results I believe. It's not clear

Re: pro pametniky -historie vzniku PL/SQL

2020-07-03 Thread Pavel Stehule
Hi I am sorry, wrong mailing list. Regards Pavel pá 3. 7. 2020 v 21:16 odesílatel Pavel Stehule napsal: > Ahoj > > PL/pgSQL vznikl jako jednoducha implementace jazyka silne inspirovana > PL/SQL. Proto muze byt zajimave si neco precist o PL/SQL > > > http://oracle-internals.com/blog/2020/04/29

pro pametniky -historie vzniku PL/SQL

2020-07-03 Thread Pavel Stehule
Ahoj PL/pgSQL vznikl jako jednoducha implementace jazyka silne inspirovana PL/SQL. Proto muze byt zajimave si neco precist o PL/SQL http://oracle-internals.com/blog/2020/04/29/a-not-so-brief-but-very-accurate-history-of-pl-sql/ Pavel

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Magnus Hagander
On Fri, Jul 3, 2020 at 7:06 PM Tom Lane wrote: > Magnus Hagander writes: > > On Fri, Jul 3, 2020 at 6:12 PM Tom Lane wrote: > >> The lack of documentation seems to be my fault, so I'm willing to pick > >> this up unless somebody else wants it. > > > If the comments I included in that patch are

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Tom Lane
Magnus Hagander writes: > On Fri, Jul 3, 2020 at 6:12 PM Tom Lane wrote: >> The lack of documentation seems to be my fault, so I'm willing to pick >> this up unless somebody else wants it. > If the comments I included in that patch are enough, I can just commit > those along with it. Otherwise,

Re: POC: rational number type (fractions)

2020-07-03 Thread Tom Lane
Andrew Dunstan writes: > On 7/2/20 10:01 AM, Tom Lane wrote: >> Yeah. We *must not* simply give up on extensibility and decide that >> every interesting feature has to be in core. I don't have any great >> ideas about how we grow the wider Postgres development community and >> infrastructure, bu

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Magnus Hagander
On Fri, Jul 3, 2020 at 6:12 PM Tom Lane wrote: > Magnus Hagander writes: > > A quick look -- to do things right, we will need to know the database > > default tablespace in this case right? Which I guess isn't there because > > the shared fileset isn't tied to a database. But perhaps it's as eas

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Tom Lane
Magnus Hagander writes: > A quick look -- to do things right, we will need to know the database > default tablespace in this case right? Which I guess isn't there because > the shared fileset isn't tied to a database. But perhaps it's as easy as > something like the attached, just overwriting the

Re: POC: rational number type (fractions)

2020-07-03 Thread Andrew Dunstan
On 7/2/20 10:01 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 7/1/20 7:00 PM, Stephen Frost wrote: >>> ... extensions outside of PG simply don't thrive as independent projects. >>> >>> There's various potential reasons for that, from being hard to find, to >>> being hard to install and wo

Re: Cache lookup errors with functions manipulation object addresses

2020-07-03 Thread Alvaro Herrera
On 2020-Jul-02, Michael Paquier wrote: > Attached is an updated patch set, because of conflicts in the docs. > Daniel, you are still registered as a reviewer of this patch, and it > is marked as ready for committer? Do you have more comments? Would > anybody have objections if I move on with 000

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Magnus Hagander
On Fri, Jul 3, 2020 at 4:16 PM Tom Lane wrote: > Magnus Hagander writes: > > Thanks. pushed! > > Sorry for not having paid more attention earlier, but this patch is > quite broken. If it weren't misguided it'd still be wrong, because > this isn't the only spot in PrepareTempTablespaces that ins

Re: Default setting for enable_hashagg_disk (hash_mem)

2020-07-03 Thread Justin Pryzby
On Fri, Jul 03, 2020 at 10:08:08AM -0400, Bruce Momjian wrote: > On Thu, Jul 2, 2020 at 08:35:40PM -0700, Peter Geoghegan wrote: > > But the problem isn't really the hashaggs-that-spill patch itself. > > Rather, the problem is the way that work_mem is supposed to behave in > > general, and the imp

Re: warnings for invalid function casts

2020-07-03 Thread Tom Lane
Peter Eisentraut writes: > On 2020-06-30 21:38, Tom Lane wrote: >> In any case, I think the issue here is what is the escape hatch for saying >> that "I know this cast is okay, don't warn about it, thanks". Treating >> "void (*) (void)" as special for that purpose is nothing more nor less >> than

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Tom Lane
Magnus Hagander writes: > Thanks. pushed! Sorry for not having paid more attention earlier, but this patch is quite broken. If it weren't misguided it'd still be wrong, because this isn't the only spot in PrepareTempTablespaces that inserts InvalidOid into the output list. But, in fact, it's in

Re: TAP tests and symlinks on Windows

2020-07-03 Thread Peter Eisentraut
On 2020-06-30 14:13, Michael Paquier wrote: Attached is an updated patch, where I have tried to use a better wording in all the code paths involved. This new patch doesn't work for me on MSYS2 yet. It fails right now in 010_pg_basebackup.pl at my $realTsDir = TestLib::perl2host("$sho

Re: Default setting for enable_hashagg_disk (hash_mem)

2020-07-03 Thread Bruce Momjian
On Thu, Jul 2, 2020 at 08:35:40PM -0700, Peter Geoghegan wrote: > But the problem isn't really the hashaggs-that-spill patch itself. > Rather, the problem is the way that work_mem is supposed to behave in > general, and the impact that that has on hash aggregate now that it > has finally been brou

Re: warnings for invalid function casts

2020-07-03 Thread Peter Eisentraut
On 2020-06-30 21:38, Tom Lane wrote: In any case, I think the issue here is what is the escape hatch for saying that "I know this cast is okay, don't warn about it, thanks". Treating "void (*) (void)" as special for that purpose is nothing more nor less than a kluge, so another compiler might do

Re: Persist MVCC forever - retain history

2020-07-03 Thread Adam Brusselback
> But I didn't fill a big interest to it from community. Just fyi, it is something that I use in my database design now (just hacked together using ranges / exclusion constraints) and would love for a well supported solution. I've chimed in a couple times as this feature has popped up in discussio

Re: Cleanup - Removed unused function parameter in reorder buffer & parallel vacuum

2020-07-03 Thread Tom Lane
Amit Kapila writes: > On Fri, Jul 3, 2020 at 2:06 PM Simon Riggs wrote: >> Seems like a change with low utility. > Yeah, all or most of the ReorderBuffer APIs seem to take the > "ReorderBuffer *" parameter, so not sure if removing from some of them > is useful or not. At least in the current fo

Re: Missing "Up" navigation link between parts and doc root?

2020-07-03 Thread Tom Lane
Peter Eisentraut writes: > On 2020-06-21 09:19, Fabien COELHO wrote: >> I've been annoyed that the documentation navigation does not always has an >> "Up" link. It has them inside parts, but the link disappears and you have >> to go for the "Home" link which is far on the right when on the root pa

Re: Parallell hashjoin sometimes ignores temp_tablespaces

2020-07-03 Thread Magnus Hagander
On Mon, Jun 29, 2020 at 10:26 PM Daniel Gustafsson wrote: > > On 29 Jun 2020, at 17:02, Magnus Hagander wrote: > > > I think the fix is the attached one (tested on version 11 which is what > $customer is using). To me it looks like this may have been a copy/paste > error all the way back in 98e

Re: Cleanup - Removed unused function parameter in reorder buffer & parallel vacuum

2020-07-03 Thread Amit Kapila
On Fri, Jul 3, 2020 at 2:06 PM Simon Riggs wrote: > > On Fri, 3 Jul 2020 at 09:07, vignesh C wrote: > >> >> While checking through the code I found that some of the function >> parameters in reorderbuffer & vacuumlazy are not used. I felt this >> could be removed. I'm not sure if it is kept for

Re: estimation problems for DISTINCT ON with FDW

2020-07-03 Thread Etsuro Fujita
On Fri, Jul 3, 2020 at 5:19 AM Tom Lane wrote: > Concretely, I now propose the attached, which seems entirely > safe to back-patch. The patch looks good to me. And +1 for back-patching. Best regards, Etsuro Fujita

Re: Cleanup - Removed unused function parameter in reorder buffer & parallel vacuum

2020-07-03 Thread Masahiko Sawada
On Fri, 3 Jul 2020 at 17:07, vignesh C wrote: > > Hi, > > While checking through the code I found that some of the function > parameters in reorderbuffer & vacuumlazy are not used. I felt this > could be removed. I'm not sure if it is kept for future use or not. > Attached patch contains the chan

Re: track_planning causing performance regression

2020-07-03 Thread Fujii Masao
On 2020/07/03 16:02, Pavel Stehule wrote: pá 3. 7. 2020 v 8:57 odesílatel Fujii Masao mailto:masao.fu...@oss.nttdata.com>> napsal: On 2020/07/03 13:05, Pavel Stehule wrote: > Hi > > pá 3. 7. 2020 v 4:39 odesílatel Fujii Masao mailto:masao.fu...@oss.nttdata.com>

Re: Cache lookup errors with functions manipulation object addresses

2020-07-03 Thread Daniel Gustafsson
> On 2 Jul 2020, at 07:35, Michael Paquier wrote: > > On Thu, Mar 19, 2020 at 10:30:11PM +0900, Michael Paquier wrote: >> The new FORMAT_TYPE_* flag still makes sense to me while reading this >> code once again, as well as the extensibility of the new APIs for >> operators and procedures. One do

Re: Creating a function for exposing memory usage of backend process

2020-07-03 Thread Fujii Masao
On 2020/07/03 11:45, torikoshia wrote: On Wed, Jul 1, 2020 at 10:15 PM torikoshia wrote: I'm going to do some renaming and transportations. - view name: pg_memory_contexts I like more specific name like pg_backend_memory_contexts. But I'd like to hear more opinions about the name from oth

Re: proposal - psql - possibility to redirect only tabular output

2020-07-03 Thread Artur Zakirov
Hello, On Sat, Apr 11, 2020 at 6:20 PM Pavel Stehule wrote: > Main motivation for this patch is working with psql for writing and editing > queries, and browsing result in second terminal with pspg or any other > similar tool (tail, ...). The advantage of this setup is possibility to see > sql

Re: pgbench: option delaying queries till connections establishment?

2020-07-03 Thread Daniel Gustafsson
> On 17 May 2020, at 11:55, Fabien COELHO wrote: > I have split the patch. > > * First patch reworks time measurements in pgbench. > * Second patch adds a barrier before starting the bench > > It applies on top of the previous one. The initial imbalance due to thread > creation times is smoot

Parallel worker hangs while handling errors.

2020-07-03 Thread vignesh C
Hi, Parallel worker hangs while handling errors. Analysis: When there is an error in the parallel worker process, we will call ereport/elog with the error message. Worker will then jump from errfinish to setjmp in StartBackgroundWorker function which was set earlier. Then the worker process will

Re: Missing "Up" navigation link between parts and doc root?

2020-07-03 Thread Peter Eisentraut
On 2020-06-21 09:19, Fabien COELHO wrote: I've been annoyed that the documentation navigation does not always has an "Up" link. It has them inside parts, but the link disappears and you have to go for the "Home" link which is far on the right when on the root page of a part? Is there a good reas

Re: Cleanup - Removed unused function parameter in reorder buffer & parallel vacuum

2020-07-03 Thread Simon Riggs
On Fri, 3 Jul 2020 at 09:07, vignesh C wrote: > While checking through the code I found that some of the function > parameters in reorderbuffer & vacuumlazy are not used. I felt this > could be removed. I'm not sure if it is kept for future use or not. > Attached patch contains the changes for

Re: [PATCH] Finally split StdRdOptions into HeapOptions and ToastOptions

2020-07-03 Thread Nikolay Shaplov
В письме от четверг, 2 июля 2020 г. 17:15:13 MSK пользователь Daniel Gustafsson написал: > > A new version of the patch. > > Autovacuum options were extended in b07642db > > > > So I added that options to the current patch. > > The heapam.c hunk in this version fails to apply to HEAD, can you p

Cleanup - Removed unused function parameter in reorder buffer & parallel vacuum

2020-07-03 Thread vignesh C
Hi, While checking through the code I found that some of the function parameters in reorderbuffer & vacuumlazy are not used. I felt this could be removed. I'm not sure if it is kept for future use or not. Attached patch contains the changes for the same. Thoughts? Regards, Vignesh EnterpriseDB:

Re: Curious - "logical replication launcher" (PID) existed with exit code 1

2020-07-03 Thread Peter Eisentraut
On 2020-06-23 22:48, David G. Johnston wrote: In the following log file the presence of "exit code 1" after performing a "pg_ctl stop -m smart" shutdown is bugging me.  I take it most people would just ignore it as noise but a clean install from source, startup, and shutdown would ideally not r

Re: Cleanup - adjust the code crossing 80-column window limit

2020-07-03 Thread Peter Eisentraut
On 2020-07-01 09:00, Amul Sul wrote: Attached patch makes an adjustment to ipc.c code to be in the 80-column window. I can see an argument that this makes the code a bit easier to read, but making code fit into 80 columns doesn't have to be a goal by itself. -- Peter Eisentraut

Re: max_slot_wal_keep_size and wal_keep_segments

2020-07-03 Thread Masahiko Sawada
On Thu, 2 Jul 2020 at 02:18, David Steele wrote: > > On 7/1/20 10:54 AM, Alvaro Herrera wrote: > > On 2020-Jul-01, Fujii Masao wrote: > > > >> On 2020/07/01 12:26, Alvaro Herrera wrote: > >>> On 2020-Jun-30, Fujii Masao wrote: > >>> > When I talked about max_slot_wal_keep_size as new feature

Re: Persist MVCC forever - retain history

2020-07-03 Thread Konstantin Knizhnik
On 02.07.2020 21:55, Mitar wrote: Hi! (Sorry if this was already discussed, it looks pretty obvious, but I could not find anything.) I was thinking and reading about how to design the schema to keep records of all changes which happen to the table, at row granularity, when I realized that al

Re: SEARCH and CYCLE clauses

2020-07-03 Thread Peter Eisentraut
While the larger patch is being considered, I think some simpler and separable pieces could be addressed. Here is a patch that adjusts the existing cycle detection example and test queries to put the cycle column before the path column. The CYCLE clause puts them in that order, and so if we a

Re: track_planning causing performance regression

2020-07-03 Thread Pavel Stehule
pá 3. 7. 2020 v 8:57 odesílatel Fujii Masao napsal: > > > On 2020/07/03 13:05, Pavel Stehule wrote: > > Hi > > > > pá 3. 7. 2020 v 4:39 odesílatel Fujii Masao > napsal: > > > > > > > > On 2020/07/01 7:37, Peter Geoghegan wrote: > > > On Tue, Jun 30, 2