Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-10 Thread Craig Ringer
On Wed, 11 Mar 2020 at 13:47, Pavel Stehule wrote: > > st 11. 3. 2020 v 6:43 odesílatel Julien Rouhaud napsal: >> >> Le mer. 11 mars 2020 à 05:28, Laurenz Albe a >> écrit : >>> >>> On Wed, 2020-03-11 at 11:25 +0800, Craig Ringer wrote: >>> > Short version: Currently if the server is built with

Re: [PATCH] Replica sends an incorrect epoch in its hot standby feedback to the Master

2020-03-10 Thread Thomas Munro
On Sat, Feb 22, 2020 at 6:10 AM Palamadai, Eka wrote: > Thanks a lot for the feedback. Please let me know if you have any further > comments. Meanwhile, I have also added this patch to "Commitfest 2020-03" at > https://commitfest.postgresql.org/27/2464. Thanks for the excellent reproducer for t

Re: custom postgres launcher for tests

2020-03-10 Thread Craig Ringer
On Fri, 21 Feb 2020 at 17:05, Ivan N. Taranov wrote: > > On Fri, Feb 21, 2020 at 4:49 AM Craig Ringer wrote: > > > I thought I saw a related patch to this that proposed to add a pg_ctl > > argument. Was that you too? I can't find it at the moment. I've had it on my TODO forever but I don't think

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread Masahiko Sawada
On Wed, 11 Mar 2020 at 13:24, Laurenz Albe wrote: > > On Wed, 2020-03-11 at 12:00 +0900, Masahiko Sawada wrote: > > > > I have one question about this patch from architectural perspective: > > > > have you considered to use autovacuum_vacuum_threshold and > > > > autovacuum_vacuum_scale_factor als

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-10 Thread Pavel Stehule
st 11. 3. 2020 v 6:43 odesílatel Julien Rouhaud napsal: > Le mer. 11 mars 2020 à 05:28, Laurenz Albe a > écrit : > >> On Wed, 2020-03-11 at 11:25 +0800, Craig Ringer wrote: >> > Short version: Currently if the server is built with --with-llvm the >> > -devel packages must depend on clang for PGX

Re: Do we need to handle orphaned prepared transactions in the server?

2020-03-10 Thread Masahiko Sawada
On Mon, 2 Mar 2020 at 21:42, Hamid Akhtar wrote: > > Here is the v2 of the same patch after rebasing it and running it through > pgindent. There are no other code changes. > Thank you for working on this. I think what this patch tries to achieve would be helpful to inform orphaned prepared trans

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-10 Thread Julien Rouhaud
Le mer. 11 mars 2020 à 05:28, Laurenz Albe a écrit : > On Wed, 2020-03-11 at 11:25 +0800, Craig Ringer wrote: > > Short version: Currently if the server is built with --with-llvm the > > -devel packages must depend on clang for PGXS to work, even though > > llvm is otherwise optional. This is a p

Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side

2020-03-10 Thread Fujii Masao
On 2020/03/11 3:39, Magnus Hagander wrote: On Tue, Mar 10, 2020 at 6:19 PM Fujii Masao wrote: On 2020/03/10 22:43, Amit Langote wrote: On Tue, Mar 10, 2020 at 6:09 PM Fujii Masao wrote: So, I will make the patch adding support for --no-estimate-size option in pg_basebackup. Patch atta

Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side

2020-03-10 Thread Fujii Masao
On 2020/03/11 13:44, Amit Langote wrote: On Wed, Mar 11, 2020 at 3:39 AM Magnus Hagander wrote: On Tue, Mar 10, 2020 at 6:19 PM Fujii Masao wrote: Attached is the updated version of the patch. Would it perhaps be better to return NULL instead of 0 in the statistics view if there is no da

Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side

2020-03-10 Thread Amit Langote
On Wed, Mar 11, 2020 at 3:39 AM Magnus Hagander wrote: > On Tue, Mar 10, 2020 at 6:19 PM Fujii Masao > wrote: > > Attached is the updated version of the patch. > > Would it perhaps be better to return NULL instead of 0 in the > statistics view if there is no data? NULL sounds better than 0. Th

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-10 Thread Laurenz Albe
On Wed, 2020-03-11 at 11:25 +0800, Craig Ringer wrote: > Short version: Currently if the server is built with --with-llvm the > -devel packages must depend on clang for PGXS to work, even though > llvm is otherwise optional. This is a particular problem on older > platforms where 3rd party LLVM may

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread Laurenz Albe
On Wed, 2020-03-11 at 12:00 +0900, Masahiko Sawada wrote: > > > I have one question about this patch from architectural perspective: > > > have you considered to use autovacuum_vacuum_threshold and > > > autovacuum_vacuum_scale_factor also for this purpose? > > > > I am torn. > > > > On the one ha

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-10 Thread Andy Fan
On Wed, Mar 11, 2020 at 6:49 AM David Rowley wrote: > On Wed, 11 Mar 2020 at 02:50, Ashutosh Bapat > wrote: > > > > On Tue, Mar 10, 2020 at 1:49 PM Andy Fan > wrote: > > > In my current implementation, it calculates the uniqueness for each > > > BaseRel only, but in your way, looks we need to

Re: Improve search for missing parent downlinks in amcheck

2020-03-10 Thread Peter Geoghegan
On Tue, Mar 10, 2020 at 8:30 AM Alexander Korotkov wrote: > Yes, current example looks confusing in this aspect. But your comment > spotted to me an algorithmic issue. We don't match highkey of > leftmost child against parent pivot key. But we can. The "if > (!BlockNumberIsValid(blkno))" branc

Re: Add an optional timeout clause to isolationtester step.

2020-03-10 Thread Michael Paquier
On Tue, Mar 10, 2020 at 02:53:36PM +0100, Julien Rouhaud wrote: > So basically we could just change pg_isolation_test_session_is_blocked() to > also return the wait_event_type and wait_event, and adding something like Hmm. I think that Tom has in mind the reasons behind 511540d here. > step "" {

Re: Index Skip Scan

2020-03-10 Thread Andy Fan
> > > I think the UniqueKeys may need to be changed from using > EquivalenceClasses to use Exprs instead. > When I try to understand why UniqueKeys needs EquivalenceClasses, see your comments here. I feel that FuncExpr can't be used to as a UniquePath even we can create unique index on f(a) and

Re: Proposal: PqSendBuffer removal

2020-03-10 Thread Craig Ringer
faifaiOn Sat, 7 Mar 2020 at 02:45, Andres Freund wrote: > > Hi, > > On March 5, 2020 1:23:21 PM PST, Aleksei Ivanov wrote: > >Thank you for your reply! > > > >Yes, you are right there will be a separate call to send the data, but > >is > >copying data each time more costly operation than just one

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-10 Thread Michael Paquier
On Tue, Mar 10, 2020 at 12:39:53PM -0300, Alvaro Herrera wrote: > Another option is to return the command as a palloc'ed string (per > psprintf), instead of using a caller-stack-allocated variable. Passing > the buffer len is widely used, but more error prone (and I think getting > this one wrong

[PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-10 Thread Craig Ringer
Short version: Currently if the server is built with --with-llvm the -devel packages must depend on clang for PGXS to work, even though llvm is otherwise optional. This is a particular problem on older platforms where 3rd party LLVM may be required to build the server's llvmjit support. Work around

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread Masahiko Sawada
On Wed, 11 Mar 2020 at 04:17, Laurenz Albe wrote: > > On Tue, 2020-03-10 at 18:14 +0900, Masahiko Sawada wrote: > > Thanks for the review and your thoughts! > > > FYI actually vacuum could perform index cleanup phase (i.g. > > PROGRESS_VACUUM_PHASE_INDEX_CLEANUP phase) on a table even if it's a >

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-10 Thread Amit Kapila
On Tue, Mar 10, 2020 at 6:48 PM Robert Haas wrote: > > On Sat, Mar 7, 2020 at 10:23 AM Tom Lane wrote: > > I continue to think that we'd be better off getting all of this > > out of the heavyweight lock manager. There is no reason why we > > should need deadlock detection, or multiple holds of t

Re: Improve handling of parameter differences in physical replication

2020-03-10 Thread Kyotaro Horiguchi
At Tue, 10 Mar 2020 14:47:47 +0100, Peter Eisentraut wrote in > On 2020-03-10 09:57, Kyotaro Horiguchi wrote: > >> Well I meant to periodically send warning messages while waiting for > >> parameter change, that is after exhausting resources and stopping > >> recovery. In this situation user nee

Re: Asynchronous Append on postgres_fdw nodes.

2020-03-10 Thread movead li
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:not tested I redo the make installcheck-world as Kyotaro Horiguchi point out

Re: Re: Asynchronous Append on postgres_fdw nodes.

2020-03-10 Thread movead...@highgo.ca
>It seems to me that you are setting a path containing ".." to PGDATA. Thanks point it for me. Highgo Software (Canada/China/Pakistan) URL : www.highgo.ca EMAIL: mailto:movead(dot)li(at)highgo(dot)ca

Re: [PATCH] Fix for slow GIN index queries when "gin_fuzzy_search_limit" setting is relatively small for large tables

2020-03-10 Thread Tom Lane
=?UTF-8?B?QWTDqQ==?= writes: > Like the title says, using "gin_fuzzy_search_limit" degrades speed when it > has a relatively low setting. > ... > Attached is SQL to test and observe this issue and also attached is a patch > I want to eventually submit to a commitfest. I took a brief look at this.

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-10 Thread David Rowley
On Tue, 10 Mar 2020 at 21:19, Andy Fan wrote: > >> SELECT DISTINCT max(non_unique) FROM t1; to skip doing the DISTINCT part. > > > Actually I want to keep the distinct for this case now. One reason is there > are only 1 > row returned, so the distinct erasing can't help much. The more importan

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-10 Thread David Rowley
On Wed, 11 Mar 2020 at 02:50, Ashutosh Bapat wrote: > > On Tue, Mar 10, 2020 at 1:49 PM Andy Fan wrote: > > In my current implementation, it calculates the uniqueness for each > > BaseRel only, but in your way, looks we need to calculate the > > UniquePathKey for both BaseRel and JoinRel. This

Re: Index Skip Scan

2020-03-10 Thread David Rowley
On Wed, 11 Mar 2020 at 01:38, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > >On Tue, Mar 10, 2020 at 09:29:32AM +1300, David Rowley wrote: > > There's also some weird looking assumptions that an EquivalenceMember > > can only be a Var in create_distinct_paths(). I think you're only > > saved f

Re: control max length of parameter values logged

2020-03-10 Thread Tom Lane
Alexey Bashtanov writes: > I personally don't think that we necessarily need to cut the values, we > can rely on the users > being careful when using this feature -- in the same way we trusted them > use similarly dangerous > log_min_duration_statement and especially log_statement for ages. At

Re: shared-memory based stats collector

2020-03-10 Thread Andres Freund
Hi, On 2020-03-10 19:52:22 +0100, Julien Rouhaud wrote: > On Tue, Mar 10, 2020 at 1:48 PM Alvaro Herrera > wrote: > > > > On 2020-Mar-10, Kyotaro Horiguchi wrote: > > > > > At Mon, 9 Mar 2020 20:34:20 -0700, Andres Freund > > > wrote in > > > > On 2020-03-10 12:27:25 +0900, Kyotaro Horiguchi w

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread David Rowley
On Wed, 11 Mar 2020 at 08:17, Laurenz Albe wrote: > > On Tue, 2020-03-10 at 18:14 +0900, Masahiko Sawada wrote: > > I have one question about this patch from architectural perspective: > > have you considered to use autovacuum_vacuum_threshold and > > autovacuum_vacuum_scale_factor also for this p

Re: shared-memory based stats collector

2020-03-10 Thread Andres Freund
On 2020-03-10 09:48:07 -0300, Alvaro Herrera wrote: > On 2020-Mar-10, Kyotaro Horiguchi wrote: > > > At Mon, 9 Mar 2020 20:34:20 -0700, Andres Freund wrote > > in > > > On 2020-03-10 12:27:25 +0900, Kyotaro Horiguchi wrote: > > > > That's true, but I have the same concern with Tom. The archive

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-10 Thread Daniel Gustafsson
> On 10 Mar 2020, at 18:38, Peter Eisentraut > wrote: > > On 2020-03-10 12:41, Daniel Gustafsson wrote: >>> On 10 Mar 2020, at 11:53, Hugh McMaster wrote: >>> Debian (and Ubuntu) are beginning to remove foo-config legacy scripts. >>> Already, xml2-config has been flagged for removal, with packa

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread Laurenz Albe
On Tue, 2020-03-10 at 18:14 +0900, Masahiko Sawada wrote: Thanks for the review and your thoughts! > FYI actually vacuum could perform index cleanup phase (i.g. > PROGRESS_VACUUM_PHASE_INDEX_CLEANUP phase) on a table even if it's a > truly INSERT-only table, depending on > vacuum_cleanup_index_sc

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread Laurenz Albe
On Tue, 2020-03-10 at 00:00 -0500, Justin Pryzby wrote: > > +++ b/src/backend/utils/misc/postgresql.conf.sample > > +#autovacuum_vacuum_insert_threshold = 1000 # min number of row > > inserts > > + # before vacuum > > Similar to a previous comment [0]

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread Laurenz Albe
On Tue, 2020-03-10 at 13:53 +1300, David Rowley wrote: > 1. Do we need to change documentation on freeze_min_age to mention > that it does not apply in all cases? I'm leaning towards not changing > this as `VACUUM FREEZE` is also an exception to this, which I don't > see mentioned. I agree with th

Re: backend type in log_line_prefix?

2020-03-10 Thread Justin Pryzby
On Thu, Feb 13, 2020 at 06:43:32PM +0900, Fujii Masao wrote: > If we do this, backend type should be also included in csvlog? +1, I've been missing that Note, this patch seems to correspond to: b025f32e0b Add leader_pid to pg_stat_activity I had mentioned privately to Julien missing this info in

Re: Constraint's NO INHERIT option is ignored in CREATE TABLE LIKE statement

2020-03-10 Thread Tom Lane
Amit Langote writes: > On Thu, Feb 20, 2020 at 8:20 AM David G. Johnston > wrote: >> Not sure I agree with the premise that it is not supposed to be copied; is >> there some other object type the allows NO INHERIT that isn't copied when >> CREATE TABLE LIKE is used and check constraints are the

Re: shared-memory based stats collector

2020-03-10 Thread Julien Rouhaud
On Tue, Mar 10, 2020 at 1:48 PM Alvaro Herrera wrote: > > On 2020-Mar-10, Kyotaro Horiguchi wrote: > > > At Mon, 9 Mar 2020 20:34:20 -0700, Andres Freund wrote > > in > > > On 2020-03-10 12:27:25 +0900, Kyotaro Horiguchi wrote: > > > > That's true, but I have the same concern with Tom. The archi

Re: BEFORE ROW triggers for partitioned tables

2020-03-10 Thread Peter Eisentraut
On 2020-02-27 17:51, Alvaro Herrera wrote: Enabling BEFORE triggers FOR EACH ROW in partitioned tables is very easy -- just remove the check against them. With that, they work fine. This looks good to me in principle. It's a useful thing to support. 1. Just let it be. If the user does some

Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side

2020-03-10 Thread Magnus Hagander
On Tue, Mar 10, 2020 at 6:19 PM Fujii Masao wrote: > > > > On 2020/03/10 22:43, Amit Langote wrote: > > On Tue, Mar 10, 2020 at 6:09 PM Fujii Masao > > wrote: > >>> So, I will make the patch adding support for --no-estimate-size option > >>> in pg_basebackup. > >> > >> Patch attached. > > > > Li

Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)

2020-03-10 Thread Justin Pryzby
I took a step back, and I wondered whether we should add a generic function for listing a dir with metadata, possibly instead of changing the existing functions. Then one could do pg_ls_dir_metadata('pg_wal',false,false); Since pg8.1, we have pg_ls_dir() to show a list of files. Since pg10, we'v

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > Anyway, I don't anticipate having time to do anything with this patch > > but I disagree that this is a "we don't want it" kind of thing, rather > > we maybe want it, since someone cared enough to write a patch, but the

Re: backend type in log_line_prefix?

2020-03-10 Thread Alvaro Herrera
I like these patches; the first two are nice cleanup. My only gripe is that pgstat_get_backend_desc() is not really a pgstat function; I think it should have a different name with a prototype in miscadmin.h (next to the enum's new location, which I would put someplace near the "pmod.h" comment rat

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Stephen Frost
Greetings, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 2020-03-10 18:38, Stephen Frost wrote: > >>On 2/27/20 4:21 AM, Peter Eisentraut wrote: > >>>My opinion is that this is not particularly useful and not appropriate to > >>>piggy-back onto \conninfo.  Connection information

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Tom Lane
Stephen Frost writes: > Anyway, I don't anticipate having time to do anything with this patch > but I disagree that this is a "we don't want it" kind of thing, rather > we maybe want it, since someone cared enough to write a patch, but the > patch needs work and maybe we want it to look a bit diff

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Peter Eisentraut
On 2020-03-10 18:38, Stephen Frost wrote: On 2/27/20 4:21 AM, Peter Eisentraut wrote: My opinion is that this is not particularly useful and not appropriate to piggy-back onto \conninfo.  Connection information including host, port, database, user name is a well-established concept in PostgreSQL

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-10 Thread Peter Eisentraut
On 2020-03-10 12:41, Daniel Gustafsson wrote: On 10 Mar 2020, at 11:53, Hugh McMaster wrote: Debian (and Ubuntu) are beginning to remove foo-config legacy scripts. Already, xml2-config has been flagged for removal, with packages being asked to switch to pkg-config. This patch uses pkg-config

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread Stephen Frost
Greetings, * David Steele (da...@pgmasters.net) wrote: > On 2/27/20 4:21 AM, Peter Eisentraut wrote: > >My opinion is that this is not particularly useful and not appropriate to > >piggy-back onto \conninfo.  Connection information including host, port, > >database, user name is a well-established

Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side

2020-03-10 Thread Fujii Masao
On 2020/03/10 22:43, Amit Langote wrote: On Tue, Mar 10, 2020 at 6:09 PM Fujii Masao wrote: So, I will make the patch adding support for --no-estimate-size option in pg_basebackup. Patch attached. Like the idea and the patch looks mostly good. Thanks for reviewing the patch! + to

Re: backend type in log_line_prefix?

2020-03-10 Thread Kuntal Ghosh
On Tue, Mar 10, 2020 at 9:11 PM Peter Eisentraut wrote: > On 2020-03-09 16:20, Kuntal Ghosh wrote: > > In v3-0001-Refactor-ps_status.c-API.patch, > > - * postgres: walsender > > This part is still valid, right? > Sure but I figured this comment was in the context of the explanation of > how the

Re: Conflict handling for COPY FROM

2020-03-10 Thread Alexey Kondratov
On 09.03.2020 15:34, Surafel Temesgen wrote: okay attached is a rebased patch with it +    Portal        portal = NULL; ... +        portal = GetPortalByName(""); +        SetRemoteDestReceiverParams(dest, portal); I think that you do not need this, since you are using a ready DestReceiver.

Re: [PATCH] Connection time for \conninfo

2020-03-10 Thread David Steele
Hi Rodrigo, On 2/27/20 4:21 AM, Peter Eisentraut wrote: My opinion is that this is not particularly useful and not appropriate to piggy-back onto \conninfo.  Connection information including host, port, database, user name is a well-established concept in PostgreSQL programs and tools and it c

Re: backend type in log_line_prefix?

2020-03-10 Thread Julien Rouhaud
On Tue, Mar 10, 2020 at 4:41 PM Peter Eisentraut wrote: > > On 2020-03-09 16:20, Kuntal Ghosh wrote: > > In v3-0002-Unify-several-ways-to-tracking-backend-type.patch, In pgstat_get_backend_desc(), the fallback "unknown process type" description shouldn't be required anymore. Other than that, it

Re: Add absolute value to dict_int

2020-03-10 Thread Tom Lane
I wrote: > So all we really need to do is upgrade [de]serialize_deflist to be smarter > about int and float nodes. This is still a bit invasive because somebody > decided to make deserialize_deflist serve two masters, and I don't feel > like working through whether the prsheadline code would cope

Re: improve transparency of bitmap-only heap scans

2020-03-10 Thread David Steele
Hi Jeff, On 2/7/20 10:22 AM, Alexey Bashtanov wrote: I've changed it all to "unfetched" for at least not to call the same thing differently in the code and in the output, and also rebased it and fit in 80 lines width limit. What do you think of Alexey's updates? Regards, -- -David da...@pgma

Re: range_agg

2020-03-10 Thread David Fetter
On Mon, Mar 09, 2020 at 06:34:04PM -0700, Jeff Davis wrote: > On Sat, 2020-03-07 at 16:06 -0500, Tom Lane wrote: > > Actually ... have you given any thought to just deciding that ranges > > and > > multiranges are the same type? > > It has come up in a number of conversations, but I'm not sure if

Re: time for catalog/pg_cast.c?

2020-03-10 Thread Alvaro Herrera
On 2020-Mar-09, Alvaro Herrera wrote: > I extracted from the latest multirange patch a bit that creates a new > routine CastCreate() in src/backend/catalog/pg_cast.c. It contains the > catalog-accessing bits to create a new cast. It seems harmless, so I > thought I'd apply it to get rid of a cou

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-10 Thread Andy Fan
Hi Tom & David & Bapat: Thanks for your review so far. I want to summarize the current issues to help our following discussion. 1. Shall we bypass the AggNode as well with the same logic. I think yes, since the rules to bypass a AggNode and UniqueNode is exactly same. The difficulty of bypassin

Re: backend type in log_line_prefix?

2020-03-10 Thread Peter Eisentraut
On 2020-03-09 16:20, Kuntal Ghosh wrote: In v3-0001-Refactor-ps_status.c-API.patch, - * - * For a walsender, the ps display is set in the following form: - * - * postgres: walsender This part is still valid, right? Sure but I figured this comment was in the context of the explanation of ho

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-10 Thread Alvaro Herrera
On 2020-Mar-10, Michael Paquier wrote: > On Tue, Mar 10, 2020 at 01:05:40PM +0300, Alexander Korotkov wrote: > > Two options seem reasonable to me in this case. The first is to pass > > length as additional argument as you did. The second option is to > > make argument a pointer to fixed-size ar

Re: Add A Glossary

2020-03-10 Thread Corey Huinker
This latest version is an attempt at merging the work of Jürgen Purtz into what I had posted earlier. There was relatively little overlap in the terms we had chosen to define. Each glossary definition now has a reference id (good idea Jürgen), the form of which is "glossary-term". So we can link t

Re: Improve search for missing parent downlinks in amcheck

2020-03-10 Thread Alexander Korotkov
On Tue, Mar 10, 2020 at 3:07 AM Peter Geoghegan wrote: > On Sun, Mar 8, 2020 at 2:52 PM Alexander Korotkov > wrote: > > I've revised this comment. Hopefully it's better now. > > I think that the new comments about why we need a low key for the page > are much better now. Good, thank you. > > I

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-10 Thread Alexander Korotkov
On Tue, Mar 10, 2020 at 3:44 PM Michael Paquier wrote: > On Tue, Mar 10, 2020 at 01:05:40PM +0300, Alexander Korotkov wrote: > > Two options seem reasonable to me in this case. The first is to pass > > length as additional argument as you did. The second option is to > > make argument a pointer

Re: time for catalog/pg_cast.c?

2020-03-10 Thread Alvaro Herrera
I would even say that DropCastById belongs in the new file, which is just the attached. However, none of the Drop.*ById or Remove.*ById functions seem to be in backend/catalog/ at all, and moving just a single one seems to make things even more inconsistent. I think all these catalog-accessing fu

Re: WIP: System Versioned Temporal Table

2020-03-10 Thread David Steele
On 3/10/20 9:00 AM, Surafel Temesgen wrote: On Tue, Mar 3, 2020 at 9:33 PM David Steele > wrote: The patch is not exactly new for this CF but since the first version was posted 2020-01-01 and there have been no updates (except a rebase) since then

Re: Add an optional timeout clause to isolationtester step.

2020-03-10 Thread Julien Rouhaud
On Tue, Mar 10, 2020 at 12:09:12AM -0400, Tom Lane wrote: > Michael Paquier writes: > > On Mon, Mar 09, 2020 at 10:32:27PM -0400, Tom Lane wrote: > >> It strikes me to wonder whether we could improve matters by teaching > >> isolationtester to watch for particular values in a connected backend's >

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-10 Thread Ashutosh Bapat
Hi Andy, On Tue, Mar 10, 2020 at 1:49 PM Andy Fan wrote: > > Hi David: > >> >> 3. Perhaps in add_paths_to_joinrel(), or maybe when creating the join >> rel itself (I've not looked for the best location in detail), >> determine if the join can cause rows to be duplicated. If it can't, >> then add

Ecpg dependency

2020-03-10 Thread Filip Janus
Hello, After upgrade from 11.2 to 12.2 I found, that build of ecpg component depends on pgcommon_shlib and pgport_shlib. But build of ecpg doesn't include build of pgcommon_shlib and pgport_shlib. That means, if I want to build ecpg, first I need to build pgcommon_shlib and pgport_shlib and after

Re: Improve handling of parameter differences in physical replication

2020-03-10 Thread Peter Eisentraut
On 2020-03-10 09:57, Kyotaro Horiguchi wrote: Well I meant to periodically send warning messages while waiting for parameter change, that is after exhausting resources and stopping recovery. In this situation user need to notice that as soon as possible. If we lose connection, standby continues

Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side

2020-03-10 Thread Amit Langote
On Tue, Mar 10, 2020 at 6:09 PM Fujii Masao wrote: > > So, I will make the patch adding support for --no-estimate-size option > > in pg_basebackup. > > Patch attached. Like the idea and the patch looks mostly good. + total size. If the estimation is disabled in + pg_basebackup + (

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-10 Thread Robert Haas
On Sat, Mar 7, 2020 at 10:23 AM Tom Lane wrote: > I continue to think that we'd be better off getting all of this > out of the heavyweight lock manager. There is no reason why we > should need deadlock detection, or multiple holds of the same > lock, or pretty much anything that LWLocks don't giv

Re: Restore replication settings when modifying a field type

2020-03-10 Thread Euler Taveira
On Thu, 5 Mar 2020 at 09:45, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2020-02-11 00:38, Quan Zongliang wrote: > > new patch attached. > > I didn't like so much how the updating of the replica identity was > hacked into the middle of ATRewriteCatalogs(). I have an alternati

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-10 Thread Robert Haas
On Fri, Mar 6, 2020 at 11:27 PM Dilip Kumar wrote: > I think instead of the flag we need to keep the counter because we can > acquire the same relation extension lock multiple times. So > basically, every time we acquire the lock we can increment the counter > and while releasing we can decrement

Re: adding partitioned tables to publications

2020-03-10 Thread Amit Langote
On Tue, Mar 10, 2020 at 5:52 PM Peter Eisentraut wrote: > I have committed the 0001 patch of this series (partitioned table member > of publication). I changed the new argument of > GetPublicationRelations() to an enum and reformatted some comments. > I'll continue looking through the subsequent

Re: WIP: System Versioned Temporal Table

2020-03-10 Thread Surafel Temesgen
Hi, On Tue, Mar 3, 2020 at 9:33 PM David Steele wrote: > Hi Surafel, > > On 1/3/20 5:57 AM, Surafel Temesgen wrote: > > Rebased and conflict resolved i hope it build clean this time > > This patch no longer applies according to cfbot and there are a number > of review comments that don't seem to

Re: shared-memory based stats collector

2020-03-10 Thread Alvaro Herrera
On 2020-Mar-10, Kyotaro Horiguchi wrote: > At Mon, 9 Mar 2020 20:34:20 -0700, Andres Freund wrote > in > > On 2020-03-10 12:27:25 +0900, Kyotaro Horiguchi wrote: > > > That's true, but I have the same concern with Tom. The archive bacame > > > too-tightly linked with other processes than actual

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-10 Thread Michael Paquier
On Tue, Mar 10, 2020 at 01:05:40PM +0300, Alexander Korotkov wrote: > Two options seem reasonable to me in this case. The first is to pass > length as additional argument as you did. The second option is to > make argument a pointer to fixed-size array as following. > > extern bool BuildRestoreC

Re: Index Skip Scan

2020-03-10 Thread Dmitry Dolgov
> >On Tue, Mar 10, 2020 at 09:29:32AM +1300, David Rowley wrote: > On Tue, 10 Mar 2020 at 08:56, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > Assuming we'll implement it in a way that we do not know about what kind > > of path type is that in create_distinct_path, then it can also work for > >

Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-10 Thread Daniel Gustafsson
> On 10 Mar 2020, at 11:53, Hugh McMaster wrote: > Debian (and Ubuntu) are beginning to remove foo-config legacy scripts. > Already, xml2-config has been flagged for removal, with packages being > asked to switch to pkg-config. > > This patch uses pkg-config's PKG_CHECK_MODULES macro to detect l

Re: Remove win32ver.rc from version_stamp.pl

2020-03-10 Thread Peter Eisentraut
On 2020-03-09 15:55, Tom Lane wrote: Peter Eisentraut writes: On 2020-03-01 23:51, Tom Lane wrote: In general, while I'm on board with the idea, I wonder whether it wouldn't be smarter to keep on defining PG_MAJORVERSION as a string, and just add PG_MAJORVERSION_NUM alongside of it. Agreed.

[PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library

2020-03-10 Thread Hugh McMaster
Dear developers, Debian (and Ubuntu) are beginning to remove foo-config legacy scripts. Already, xml2-config has been flagged for removal, with packages being asked to switch to pkg-config. This patch uses pkg-config's PKG_CHECK_MODULES macro to detect libxml2 or, if pkg-config is not available,

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2020-03-10 Thread Amit Kapila
On Mon, Feb 24, 2020 at 3:38 PM Amit Kapila wrote: > > On Thu, Feb 20, 2020 at 8:06 AM Andres Freund wrote: > > What I'm advocating is that extension locks should continue to go > > through lock.c. And yes, that requires some changes to group locking, > > but I still don't see why they'd be compl

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2020-03-10 Thread Alexander Korotkov
On Tue, Mar 10, 2020 at 7:28 AM Michael Paquier wrote: > On Mon, Mar 09, 2020 at 03:38:29PM +0530, Kuntal Ghosh wrote: > > That's a good suggestion. But, it's unlikely that a caller would pass > > something longer than MAXPGPATH and we indeed use that value a lot in > > the code. IMHO, it looks ok

GSOC 2020 - Develop Performance Farm Benchmarks and Website (2020)

2020-03-10 Thread do w.r. (wrd1e16)
Hi, I am very interested in the Develop Performance Farm Benchmarks and Website (2020) project as one of the GSOC project. Is it possible to link me up with Andreas Scherbaum to discuss more and further understand the project? Regards, Wen Rei MEng Electrical and Electronics, ECS University of

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-10 Thread Ashutosh Bapat
On Tue, Mar 10, 2020 at 3:51 AM David Rowley wrote: > On Sat, 7 Mar 2020 at 00:47, Andy Fan wrote: > > Upload the newest patch so that the cfbot can pass. The last patch > failed > > because some explain without the (cost off). > > I've only really glanced at this patch, but I think we need to

Re: Remove utils/acl.h from catalog/objectaddress.h

2020-03-10 Thread Peter Eisentraut
On 2020-03-09 17:07, Alvaro Herrera wrote: On 2020-Mar-07, Peter Eisentraut wrote: I noticed that catalog/objectaddress.h includes utils/acl.h for no apparent reason. It turns out this used to be needed but not anymore. So removed it and cleaned up the fallout. Patch attached. parser/parse_

Re: Berserk Autovacuum (let's save next Mandrill)

2020-03-10 Thread Masahiko Sawada
On Fri, 6 Mar 2020 at 23:46, Laurenz Albe wrote: > > Thanks, Justin, for the review. > I have applied the changes where still applicable. > > On Fri, 2020-03-06 at 10:52 +1300, David Rowley wrote: > > On Fri, 6 Mar 2020 at 03:27, Laurenz Albe wrote: > > > On Thu, 2020-03-05 at 19:40 +1300, David

Re: pg_stat_progress_basebackup - progress reporting for pg_basebackup, in the server side

2020-03-10 Thread Fujii Masao
On 2020/03/10 11:36, Fujii Masao wrote: On 2020/03/09 14:21, Magnus Hagander wrote: On Sun, Mar 8, 2020 at 10:13 PM Kyotaro Horiguchi wrote: At Fri, 6 Mar 2020 09:54:09 -0800, Magnus Hagander wrote in On Fri, Mar 6, 2020 at 1:51 AM Fujii Masao wrote: I believe that the time required

Re: Improve handling of parameter differences in physical replication

2020-03-10 Thread Kyotaro Horiguchi
At Mon, 9 Mar 2020 21:13:38 +0900, Masahiko Sawada wrote in > On Mon, 9 Mar 2020 at 18:45, Peter Eisentraut > wrote: > > > > On 2020-03-09 09:11, Masahiko Sawada wrote: > > > I think after recovery is paused users will be better to restart the > > > server rather than resume the recovery. I agr

Re: adding partitioned tables to publications

2020-03-10 Thread Peter Eisentraut
I have committed the 0001 patch of this series (partitioned table member of publication). I changed the new argument of GetPublicationRelations() to an enum and reformatted some comments. I'll continue looking through the subsequent patches. -- Peter Eisentraut http://www.2ndQuad

Re: [PATCH] Erase the distinctClause if the result is unique by definition

2020-03-10 Thread Andy Fan
Hi David: > 3. Perhaps in add_paths_to_joinrel(), or maybe when creating the join > rel itself (I've not looked for the best location in detail), > determine if the join can cause rows to be duplicated. If it can't, > then add the UniqueKeys from that rel. I have some concerns about this method

Re: reindex concurrently and two toast indexes

2020-03-10 Thread Michael Paquier
On Tue, Mar 10, 2020 at 12:09:42PM +0900, Michael Paquier wrote: > On Mon, Mar 09, 2020 at 08:04:27AM +0100, Julien Rouhaud wrote: >> Agreed. > > Thanks for checking the patch. And applied as 61d7c7b. Regarding the isolation tests, let's brainstorm on what we can do, but I am afraid that it is t

Re: Asynchronous Append on postgres_fdw nodes.

2020-03-10 Thread Kyotaro Horiguchi
Hello. Thank you for testing. At Tue, 10 Mar 2020 05:13:42 +, movead li wrote in > The following review has been posted through the commitfest application: > make installcheck-world: tested, failed > Implements feature: tested, passed > Spec compliant: tested, passed > Docum