Question: Select messages using binary format

2020-03-06 Thread Aleksei Ivanov
Dear hackers, I know that it is possible to receive packets in binary format using declare binary cursor and than fetching the result. But is it possible just using ordinary select from simple query to specify that I want to receive the result in binary? Best regards,

Re: Questions about the CI process and proposal

2020-03-06 Thread Peter Eisentraut
On 2020-03-07 04:53, Andy Fan wrote:   Based on the facts that  1).  The test cases may succeed locally but may be failed in CI for some reasons.  2).  The newer version of the patch need to be submitted with new a email reply.  3). Reviewer &  committer bandwidth is precious.  so it would be

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

2020-03-06 Thread Peter Eisentraut
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. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7

Re: Add an optional timeout clause to isolationtester step.

2020-03-06 Thread Julien Rouhaud
On Sat, Mar 07, 2020 at 10:41:42AM +0900, Michael Paquier wrote: > On Fri, Mar 06, 2020 at 02:15:47PM +0100, Julien Rouhaud wrote: > > Here's a patch to add an optional "timeout val" clause to isolationtester's > > step definition. When used, isolationtester will actively wait on the query > >

Re: Fastpath while arranging the changes in LSN order in logical decoding

2020-03-06 Thread Dilip Kumar
On Sat, Mar 7, 2020 at 9:59 AM Dilip Kumar wrote: > > On Sat, Mar 7, 2020 at 12:30 AM Andres Freund wrote: > > > > Hi, > > > > On 2020-01-08 18:06:52 +0530, Dilip Kumar wrote: > > > On Wed, 8 Jan 2020 at 5:28 PM, Heikki Linnakangas wrote: > > > > > > > On 25/11/2019 05:52, Dilip Kumar wrote: >

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

2020-03-06 Thread Amit Kapila
On Sat, Mar 7, 2020 at 9:57 AM Dilip Kumar wrote: > On Fri, Mar 6, 2020 at 9:47 AM Amit Kapila > wrote: > > > > On Thu, Mar 5, 2020 at 1:54 PM Dilip Kumar > wrote: > > > > > > On Thu, Mar 5, 2020 at 12:15 PM Amit Kapila > wrote: > > > > > > > > > > > > 5. I have also tried to think of another

[PATCH] Add tests for integrity violation error fields

2020-03-06 Thread Chris Bandy
On 3/4/20 2:54 AM, Chris Bandy wrote: > I've also convinced myself that the number of integrity errors in the > entire codebase is manageable to test. If others think it is worthwhile, > I can spend some time over the next week to expand this test approach to > cover _all_ SQLSTATE class 23

Re: More tests to stress directly checksum_impl.h

2020-03-06 Thread Michael Paquier
On Fri, Mar 06, 2020 at 03:04:27PM -0500, Tom Lane wrote: > Between that and the BLCKSZ dependency, it's not clear that we can > test this with just a plain old expected-file test case. Might > need to fall back to a TAP test. Perhaps the dependency of page.sql on 8kB pages could be improved,

Re: Fastpath while arranging the changes in LSN order in logical decoding

2020-03-06 Thread Dilip Kumar
On Sat, Mar 7, 2020 at 12:30 AM Andres Freund wrote: > > Hi, > > On 2020-01-08 18:06:52 +0530, Dilip Kumar wrote: > > On Wed, 8 Jan 2020 at 5:28 PM, Heikki Linnakangas wrote: > > > > > On 25/11/2019 05:52, Dilip Kumar wrote: > > > > In logical decoding, while sending the changes to the output

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

2020-03-06 Thread Dilip Kumar
On Fri, Mar 6, 2020 at 9:47 AM Amit Kapila wrote: > > On Thu, Mar 5, 2020 at 1:54 PM Dilip Kumar wrote: > > > > On Thu, Mar 5, 2020 at 12:15 PM Amit Kapila wrote: > > > > > > > > > 5. I have also tried to think of another way to check if we already > > > hold lock type LOCKTAG_RELATION_EXTEND,

Questions about the CI process and proposal

2020-03-06 Thread Andy Fan
Hi: I'm a brand new postgresql contributor(may be not yet since my first patch[1] is still in review stage). and have 2 questions about the CI process and to see if the questions really exist or if I can help. Based on the facts that 1). The test cases may succeed locally but may be

Re: Add an optional timeout clause to isolationtester step.

2020-03-06 Thread Michael Paquier
On Fri, Mar 06, 2020 at 02:15:47PM +0100, Julien Rouhaud wrote: > Here's a patch to add an optional "timeout val" clause to isolationtester's > step definition. When used, isolationtester will actively wait on the query > rather than continuing with the permutation next step, and will issue a

Re: PG_COLOR not mentioned in docs of vacuumlo, oid2name and pgbench

2020-03-06 Thread Michael Paquier
On Thu, Mar 05, 2020 at 10:09:31AM +0100, Juan José Santamaría Flecha wrote: > On Thu, Mar 5, 2020 at 9:40 AM Daniel Gustafsson wrote: >> LGTM > > +1 Thanks to both of you for the reviews. Please note that I will mention the business with pg_ctl and logging in a new thread and remove the diff

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

2020-03-06 Thread Michael Paquier
On Wed, Mar 04, 2020 at 10:58:31PM +0300, Nikolay Shaplov wrote: > But the truth is that my goal is to move all code that defines all option > names, min/max values etc, move it inside am code. To move data from > boolRelOpts, intRelOpts, realRelOpts, enumRelOpts, enumRelOpts from >

Re: Ltree syntax improvement

2020-03-06 Thread Nikita Glukhov
Attached new version of the patch. I did major refactoring of ltree label parsing, extracting common parsing code for ltree, lquery, and ltxtquery. This greatly simplified state machines. On the advice of Tomas Vondra, I also extracted a preliminary patch with 'if' to 'switch' conversion. On

Re: pg_ls_tmpdir to show directories and shared filesets

2020-03-06 Thread Justin Pryzby
On Thu, Mar 05, 2020 at 10:18:38AM -0600, Justin Pryzby wrote: > I'm not sure if prefer the 0002 patch alone (which recurses into dirs all at > once during the initial call), or 0002+3+4, which incrementally reads the dirs > on each call (but requires keeping dirs opened). I fixed an issue that

Re: Re[4]: bool_plperl transform

2020-03-06 Thread Tom Lane
=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= writes: > [ bool_plperl_transform_v3.patch ] I reviewed this, fixed some minor problems (mostly cosmetic, but not entirely), and pushed it. Thanks for the contribution! regards, tom lane

Re: [WIP] UNNEST(REFCURSOR): allowing SELECT to consume data from a REFCURSOR

2020-03-06 Thread Dent John
> On 22 Feb 2020, at 10:38, Dent John wrote: > >> On 18 Feb 2020, at 03:03, Thomas Munro wrote: >> >> From the trivialities department, I see a bunch of warnings about >> local declaration placement (we're still using C90 rules for those by >> project policy): >> >> […] > > […] My bad. I

Re: explain HashAggregate to report bucket and memory stats

2020-03-06 Thread Justin Pryzby
On Fri, Mar 06, 2020 at 09:58:59AM -0800, Andres Freund wrote: > > + ExplainIndentText(es); > > + appendStringInfo(es->str, > > + "Buckets: %ld (originally %ld)", > > +

Re: effective_io_concurrency's steampunk spindle maths

2020-03-06 Thread Thomas Munro
On Sat, Mar 7, 2020 at 8:35 AM Tomas Vondra wrote: > I think the main issue with keeping the current GUC name is that if you > had a value that worked, we'll silently interpret it differently. Which > is a bit annoying :-( Yeah. Perhaps we should just give the formula for translating v12

Re: effective_io_concurrency's steampunk spindle maths

2020-03-06 Thread Thomas Munro
On Sat, Mar 7, 2020 at 8:00 AM Andres Freund wrote: > On 2020-03-02 18:28:41 +1300, Thomas Munro wrote: > > * leaves room for a different setting for sequential prefetching > > I think if we want to split those at some point, we ought to split it if > we have a good reason, not before. It's not

Re: effective_io_concurrency's steampunk spindle maths

2020-03-06 Thread Thomas Munro
On Sat, Mar 7, 2020 at 9:52 AM Michael Banck wrote: > On Mon, Mar 02, 2020 at 06:28:41PM +1300, Thomas Munro wrote: > > * "maintenance_" prefix is like other GUCs that establish (presumably > > larger) limits for processes working on behalf of many user sessions > > I'm a bit skeptical about this

Re: effective_io_concurrency's steampunk spindle maths

2020-03-06 Thread Michael Banck
Hi, On Mon, Mar 02, 2020 at 06:28:41PM +1300, Thomas Munro wrote: > Should we rename it? Here are my first suggestions: > > maintenance_random_page_prefetch_degree > > Rationale for this naming pattern: [...] > * "maintenance_" prefix is like other GUCs that establish (presumably > larger)

Re: effective_io_concurrency's steampunk spindle maths

2020-03-06 Thread Tom Lane
Tomas Vondra writes: > So I think we should either rename e_i_c or keep it as is, and then also > have a new GUC. And then translate the values between those (but that > might be overkill). Please DON'T try to have two interrelated GUCs for this. We learned our lesson about that years ago. I

Re: More tests to stress directly checksum_impl.h

2020-03-06 Thread Tom Lane
Michael Paquier writes: > Attached is a patch to close the gap by adding new tests to > pageinspect aimed at detecting any formula change. The trick is to > make the page data representative enough so as it is possible to > detect problems if any part of the formulas are changed, like updates >

range_deserialize + range_get_flags

2020-03-06 Thread Alvaro Herrera
I noticed a weird thing about rangetypes API while reviewing multiranges -- the combination of range_deserialize immediately followed by range_get_flags. It seems quite odd to have range_deserialize return only one flag (empty) and force callers to use a separate range_get_flags call in order to

Re: Unicode escapes with any backend encoding

2020-03-06 Thread Chapman Flack
On 3/6/20 2:19 PM, Tom Lane wrote: >> Maybe Chapman has a use case in mind he can test with? Barring that, >> the patch seems ready for commit. > > I went ahead and pushed this, just to get it out of my queue. > Chapman's certainly welcome to kibitz some more of course. Sorry, yeah, I don't

Re: explain HashAggregate to report bucket and memory stats

2020-03-06 Thread Tomas Vondra
On Fri, Mar 06, 2020 at 09:58:59AM -0800, Andres Freund wrote: ... + } + else if (!inst->nbuckets) + ; /* Do nothing */ + else + { + if (inst->nbuckets_original != inst->nbuckets) + { +

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-03-06 Thread Kartyshov Ivan
Sorry, I have some troubles on email sending. On 2020-03-06 08:54, Kyotaro Horiguchi wrote: The syntax seems getting confused. What happens if we typed in the command "WAIT FOR TIMESTAMP '...' UNTIL TIMESTAMP ''"? It seems to me the options is useles. Couldn't the TIMEOUT option be a part

Re: effective_io_concurrency's steampunk spindle maths

2020-03-06 Thread Tomas Vondra
On Fri, Mar 06, 2020 at 10:05:13AM -0800, Andres Freund wrote: Hi, On 2020-03-02 18:28:41 +1300, Thomas Munro wrote: I was reading through some old threads[1][2][3] while trying to figure out how to add a new GUC to control I/O prefetching for new kinds of things[4][5], and enjoyed Simon

Re: Should we remove a fallback promotion? take 2

2020-03-06 Thread Alvaro Herrera
On 2020-Mar-06, Michael Paquier wrote: > On Thu, Mar 05, 2020 at 09:40:54AM -0500, Robert Haas wrote: > > Seems reasonable, but it would be better if people proposed these > > kinds of changes closer to the beginning of the release cycle rather > > than in the crush at the end. > > +1, to both

Re: move DECLARE_INDEX from indexing.h?

2020-03-06 Thread Tom Lane
Alvaro Herrera writes: > In his long bootstrap-reworking thread[1] John Naylor initially proposed > moving the DECLARE_INDEX lines from indexing.h to each of the > corresponding catalog files. However, in the end that wasn't done; > these lines are still in indexing.h. Is there a reason for

Re: WAL usage calculation patch

2020-03-06 Thread Julien Rouhaud
On Fri, Mar 6, 2020 at 6:59 PM Kirill Bychik wrote: > > пт, 6 мар. 2020 г. в 20:14, Julien Rouhaud : > > > > On Thu, Mar 5, 2020 at 8:55 PM Kirill Bychik > > wrote: > > > I wanted to keep the patch small and simple, and fit to practical > > > needs. This patch is supposed to provide tuning

Re: Unicode escapes with any backend encoding

2020-03-06 Thread Tom Lane
John Naylor writes: > Not this patch's job perhaps, but now that check_unicode_value() only > depends on the input, maybe it can be put into pgwchar.h with other > static inline helper functions? That test is duplicated in > addunicode() and pg_unicode_to_server(). Maybe: > static inline bool >

Re: Symbolic names for the values of typalign and typstorage

2020-03-06 Thread Tom Lane
Andres Freund writes: > On 2020-03-02 17:52:17 -0500, Tom Lane wrote: >> While looking at Tomas' ALTER TYPE patch, I got annoyed by the fact >> that all of the backend writes constants of type alignment and type >> storage values as literal characters, such as 'i' and 'x'. This is >> not our

Re: Proposal: PqSendBuffer removal

2020-03-06 Thread Aleksei Ivanov
*>Then we could get a StringInfo pointing directly to the current insertion point in the send buffer. To support growing it, enlargeStringInfo would first subtract the offset to the start of the allocation, and then reallocate that*. I thought about it yesterday and one issue with this approach

Re: Atomics in localbuf.c

2020-03-06 Thread Andres Freund
Hi, On 2020-03-06 11:26:41 -0500, Robert Haas wrote: > On Fri, Mar 6, 2020 at 2:04 AM Antonin Houska wrote: > > ok. What I missed is that BufferDesc.state is declared as pg_atomic_uint32 > > rather than plain int, so the pg_atomic_...() functions should be used > > regardless the buffer is

Re: Using stat collector for collecting long SQL

2020-03-06 Thread Andres Freund
Hi, On 2020-02-27 09:42:19 +0100, Pavel Stehule wrote: > There is a often problem with taking source of long SQL strings. The > pg_stat_activity field query is reduced to some short limit and is not too > practical to increase this limit. > > I have a idea to use for solution of this problem

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2020-03-06 Thread Peter Geoghegan
On Fri, Mar 6, 2020 at 11:00 AM Andres Freund wrote: > > Pushed. > > Congrats! Thanks Andres! -- Peter Geoghegan

Re: effective_io_concurrency's steampunk spindle maths

2020-03-06 Thread Andres Freund
Hi, On 2020-03-02 18:28:41 +1300, Thomas Munro wrote: > I was reading through some old threads[1][2][3] while trying to figure > out how to add a new GUC to control I/O prefetching for new kinds of > things[4][5], and enjoyed Simon Riggs' reference to Jules Verne in the > context of RAID

Re: explain HashAggregate to report bucket and memory stats

2020-03-06 Thread Andres Freund
Hi, On 2020-03-01 09:45:40 -0600, Justin Pryzby wrote: > +/* > + * Show hash bucket stats and (optionally) memory. > + */ > +static void > +show_tuplehash_info(HashTableInstrumentation *inst, ExplainState *es) > +{ > + longspacePeakKb_tuples = (inst->space_peak_tuples + 1023) / 1024, > +

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2020-03-06 Thread Andres Freund
On 2020-02-26 14:43:27 -0800, Peter Geoghegan wrote: > On Mon, Feb 24, 2020 at 4:54 PM Peter Geoghegan wrote: > > Attached is v34, which has this change. My plan is to commit something > > very close to this on Wednesday morning (barring any objections). > > Pushed. Congrats!

Re: Fastpath while arranging the changes in LSN order in logical decoding

2020-03-06 Thread Andres Freund
Hi, On 2020-01-08 18:06:52 +0530, Dilip Kumar wrote: > On Wed, 8 Jan 2020 at 5:28 PM, Heikki Linnakangas wrote: > > > On 25/11/2019 05:52, Dilip Kumar wrote: > > > In logical decoding, while sending the changes to the output plugin we > > > need to arrange them in the LSN order. But, if there

Re: Is it time to retire type "opaque"?

2020-03-06 Thread Andres Freund
Hi, On 2020-03-03 12:10:15 -0500, Tom Lane wrote: > In short, I propose ripping out OPAQUE entirely. +1 > I wouldn't lobby too hard against removing the auto-shell-type hack > either, but it's not actually type-unsafe and it doesn't require > very much code to support, so the case for removing

Re: Symbolic names for the values of typalign and typstorage

2020-03-06 Thread Andres Freund
Hi, On 2020-03-02 17:52:17 -0500, Tom Lane wrote: > While looking at Tomas' ALTER TYPE patch, I got annoyed by the fact > that all of the backend writes constants of type alignment and type > storage values as literal characters, such as 'i' and 'x'. This is > not our style for most other "poor

Re: [postgis-devel] About EXTENSION from UNPACKAGED on PostgreSQL 13

2020-03-06 Thread Andres Freund
Hi, On 2020-02-26 16:52:13 +0100, Sandro Santilli wrote: > This part is not clear to me. You're _assuming_ that the unpackaged--xxx > will not make checks, so you _drop_ support for it ? Can't the normal > extension script also be unsafe for some reason ? Yes. But it's at least plausible to make

Re: proposal: schema variables

2020-03-06 Thread Pavel Stehule
c/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -5782,6 +5782,19 @@ $$ LANGUAGE plpgsql STRICT IMMUTABLE; + + +Global variables and constants + + + The PL/pgSQL language has not packages + and then it has not package variables and package constants. The + PostgreSQL has schema variables and + immutable schema variables. The schema variables can be created + by CREATE VARIABLE described in . + + diff --git a/doc/src/sgml/ref/create_variable.sgml b/doc/src/sgml/ref/create_variable.sgml index 35a14c7c3c..1b1883a11a 100644 --- a/doc/src/sgml/ref/create_variable.sgml +++ b/doc/src/sgml/ref/create_variable.sgml @@ -58,7 +58,7 @@ CREATE [ { TEMPORARY | TEMP } ] [ IMMUTABLE ] VARIABLE [ IF NOT EXISTS ] IMMUTABLE - The value of variable cannot be changed. + The value of the variable cannot be changed. @@ -128,13 +128,12 @@ CREATE [ { TEMPORARY | TEMP } ] [ IMMUTABLE ] VARIABLE [ IF NOT EXISTS ] ON COMMIT DROP, ON TRANSACTIONAL END RESET - The ON COMMIT DROP clause specifies the bahaviour of -  temporary schema variable at transaction commit. With this clause the + The ON COMMIT DROP clause specifies the behaviour + of temporary schema variable at transaction commit. With this clause the  variable is dropped at commit time. The clause is only allowed -  for temporary variables. -  The ON TRANSACTIONAL END RESET clause enforces the - variable to be reset to its default value when the transaction is either - commited or rolled back. +  for temporary variables. The ON TRANSACTIONAL END RESET + clause enforces the variable to be reset to its default value when + the transaction is either commited or rolled back. schema-variables-20200306.patch.gz Description: application/gzip

Re: Proposal: PqSendBuffer removal

2020-03-06 Thread Andres Freund
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 syscall? Yes, it's very likely to be more expensive to execute a

Re: move DECLARE_INDEX from indexing.h?

2020-03-06 Thread Alvaro Herrera
On 2020-Mar-06, Alvaro Herrera wrote: > In his long bootstrap-reworking thread[1] John Naylor initially proposed > moving the DECLARE_INDEX lines from indexing.h to each of the > corresponding catalog files. However, in the end that wasn't done; > these lines are still in indexing.h. Is there a

move DECLARE_INDEX from indexing.h?

2020-03-06 Thread Alvaro Herrera
In his long bootstrap-reworking thread[1] John Naylor initially proposed moving the DECLARE_INDEX lines from indexing.h to each of the corresponding catalog files. However, in the end that wasn't done; these lines are still in indexing.h. Is there a reason for this? Wouldn't it make more sense

Re: Error on failed COMMIT

2020-03-06 Thread Robert Haas
On Fri, Mar 6, 2020 at 11:55 AM Dave Cramer wrote: > There have been some arguments that the client can fix this easily. > > Turns out it is not as easy as one might think. > > If the client (in this case JDBC) uses conn.commit() then yes relatively easy > as we know that commit is being

Re: WAL usage calculation patch

2020-03-06 Thread Kirill Bychik
пт, 6 мар. 2020 г. в 20:14, Julien Rouhaud : > > On Thu, Mar 5, 2020 at 8:55 PM Kirill Bychik wrote: > > > > > While at it, did you consider adding a full-page image counter in the > > > WalUsage? > > > That's something I'd really like to have and it doesn't seem hard to > > > integrate. > > >

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

2020-03-06 Thread Magnus Hagander
On Fri, Mar 6, 2020 at 1:51 AM Fujii Masao wrote: > > > > On 2020/03/06 0:45, Magnus Hagander wrote: > > On Wed, Mar 4, 2020 at 11:15 PM Peter Eisentraut > > wrote: > >> > >> On 2020-03-05 05:53, Fujii Masao wrote: > >>> Or, as another approach, it might be worth considering to make > >>> the

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

2020-03-06 Thread Robert Haas
On Thu, Mar 5, 2020 at 11:45 PM Amit Kapila wrote: > I think we can keep such a flag in TopTransactionState. We free such > locks after the work is done (except during error where we free them > at transaction abort) rather than at transaction commit, so one might > say it is better not to

Re: [PATCH] ltree, lquery, and ltxtquery binary protocol support

2020-03-06 Thread Tom Lane
Nino Floris writes: > Attached is the new patch rebased onto master. The approach of simply providing a 1.2 installation script, with no upgrade path from 1.1, is surely not going to be acceptable to anyone who's using ltree in production. Fortunately for the odds of getting this patch

Re: Allowing ALTER TYPE to change storage strategy

2020-03-06 Thread Tom Lane
"David G. Johnston" writes: > Is there also an issue with whether the type has implemented compression or > not - i.e., should the x->e and m->e paths be forbidden too? Or is it > always the case a non-plain type is compressible and the other non-plain > options just switch between preferences

Re: Allowing ALTER TYPE to change storage strategy

2020-03-06 Thread Tom Lane
Tomas Vondra writes: > On Thu, Mar 05, 2020 at 05:46:44PM -0500, Tom Lane wrote: >> For ease of review I just added the new TCFLAGS value out of >> sequence, but I'd be inclined to renumber the bits back into >> sequence before committing. > LGTM. If I had to nitpick, I'd say that the example in

Re: WAL usage calculation patch

2020-03-06 Thread Julien Rouhaud
On Thu, Mar 5, 2020 at 8:55 PM Kirill Bychik wrote: > > > While at it, did you consider adding a full-page image counter in the > > WalUsage? > > That's something I'd really like to have and it doesn't seem hard to > > integrate. > > Well, not sure I understand you 100%, being new to Postgres

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-03-06 Thread Adam Brusselback
I just wanted to express my excitement that this is being picked up again. I was very much looking forward to this years ago, and the use case for me is still there, so I am excited to see this moving again.

Re: Error on failed COMMIT

2020-03-06 Thread Dave Cramer
On Thu, 27 Feb 2020 at 08:30, Dave Cramer wrote: > > > On Thu, 27 Feb 2020 at 07:44, Dave Cramer > wrote: > >> >> >> >> On Wed, 26 Feb 2020 at 16:57, Vik Fearing >> wrote: >> >>> On 26/02/2020 22:22, Tom Lane wrote: >>> > Dave Cramer writes: >>> >> OK, here is a patch that actually doesn't

Re: Binary support for pgoutput plugin

2020-03-06 Thread Petr Jelinek
Hi Dave, On 29/02/2020 18:44, Dave Cramer wrote: rebased and removed the catversion bump. Looked into this and it generally seems okay, but I do have one gripe here: + tuple->values[i].data = palloc(len + 1); + /*

Re: Crash by targetted recovery

2020-03-06 Thread Fujii Masao
On 2020/03/06 10:29, Kyotaro Horiguchi wrote: At Thu, 5 Mar 2020 19:51:11 +0900, Fujii Masao wrote in On 2020/03/05 12:08, Kyotaro Horiguchi wrote: I understand that the reconnection for REDO record is useless. Ok I take the !StandbyMode way. The attached is the test script that is

Re: Atomics in localbuf.c

2020-03-06 Thread Robert Haas
On Fri, Mar 6, 2020 at 2:04 AM Antonin Houska wrote: > ok. What I missed is that BufferDesc.state is declared as pg_atomic_uint32 > rather than plain int, so the pg_atomic_...() functions should be used > regardless the buffer is shared or local. Sorry for the noise. Right. I thought, though,

Re: PHJ file leak.

2020-03-06 Thread Jeremy Finzel
On Fri, Mar 6, 2020 at 9:43 AM Tom Lane wrote: > Jeremy Finzel writes: > > We are hitting this leak in production on an 11.6 system for a query that > > is using a parallel hash join. Was this fix pushed in 11.7? I can't tell > > clearly from the release notes for 11.7 or this thread. > > It

RE: proposal: schema variables

2020-03-06 Thread DUVAL REMI
Hello Pavel I tested your patch again and I think things are better now, close to perfect for me. 1) Patch review - We can define CONSTANTs with CREATE IMMUTABLE VARIABLE … I’m really pleased with this - The previous bug I mentioned to you by private mail (see detail

Re: PHJ file leak.

2020-03-06 Thread Tom Lane
Jeremy Finzel writes: > We are hitting this leak in production on an 11.6 system for a query that > is using a parallel hash join. Was this fix pushed in 11.7? I can't tell > clearly from the release notes for 11.7 or this thread. It looks like you're asking about this commit: Author: Thomas

Re: PHJ file leak.

2020-03-06 Thread Jeremy Finzel
On Fri, Nov 15, 2019 at 3:32 PM Thomas Munro wrote: > On Wed, Nov 13, 2019 at 9:52 PM Amit Kapila > wrote: > > On Wed, Nov 13, 2019 at 6:13 AM Kyotaro Horiguchi < > horikyota@gmail.com> wrote: > > > The phatch's shape looks better. Thanks. > > > > +1. LGTM as well. > > Thanks. Pushed. > >

Re: Index Skip Scan

2020-03-06 Thread Tomas Vondra
On Wed, Mar 04, 2020 at 11:32:00AM +1300, David Rowley wrote: On Tue, 18 Feb 2020 at 05:24, Dmitry Dolgov <9erthali...@gmail.com> wrote: Here is something similar to what I had in mind. (changing to this email address for future emails) Hi, I've been looking over v32 of the patch and have a

Re: More tests to stress directly checksum_impl.h

2020-03-06 Thread David Steele
On 3/6/20 2:52 AM, Michael Paquier wrote: As of the thread which led to addd034 (please see https://www.postgresql.org/message-id/e1j9ioh-0005kn...@gemulon.postgresql.org, and sorry about that), it happens that we don't have any tests which validate the internal data checksum implementation

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

2020-03-06 Thread Laurenz Albe
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 Rowley wrote: > > > 1. I'd go for 2 new GUCs and reloptions. >

Re: Allowing ALTER TYPE to change storage strategy

2020-03-06 Thread Tomas Vondra
On Thu, Mar 05, 2020 at 05:46:44PM -0500, Tom Lane wrote: I wrote: If not, we probably should bite the bullet and go for #1, since I have little doubt that we'll need that someday anyway. The trick will be to keep down the cache invalidation overhead... Here's a version that does it like

Re: Should we remove a fallback promotion? take 2

2020-03-06 Thread Fujii Masao
On 2020/03/06 10:40, Michael Paquier wrote: On Thu, Mar 05, 2020 at 09:40:54AM -0500, Robert Haas wrote: Seems reasonable, but it would be better if people proposed these kinds of changes closer to the beginning of the release cycle rather than in the crush at the end. +1, to both points.

Re: replay pause vs. standby promotion

2020-03-06 Thread Fujii Masao
On 2020/03/04 23:40, Jehan-Guillaume de Rorthais wrote: On Wed, 04 Mar 2020 15:00:54 +0300 Sergei Kornilov wrote: Hello I want to start this discussion because this is related to the patch (propoesd at the thread [1]) that I'm reviewing. It does that partially, i.e., prefers the promotion

Add an optional timeout clause to isolationtester step.

2020-03-06 Thread Julien Rouhaud
On Thu, Mar 05, 2020 at 12:53:54PM +0900, Michael Paquier wrote: > On Wed, Mar 04, 2020 at 09:21:45AM +0100, Julien Rouhaud wrote: > > > Should we add some regression > > tests for that? I guess most of it could be borrowed from the patch > > to fix the toast index issue I sent last week. > > I

Re: Additional improvements to extended statistics

2020-03-06 Thread Tomas Vondra
On Fri, Mar 06, 2020 at 01:15:56AM +0100, Tomas Vondra wrote: Hi, Here is a rebased version of this patch series. I've polished the first two parts a bit - estimation of OR clauses and (Var op Var) clauses, and added a bunch of regression tests to exercise this code. It's not quite there yet,

Re: reindex concurrently and two toast indexes

2020-03-06 Thread Julien Rouhaud
On Fri, Mar 06, 2020 at 10:38:44AM +0900, Michael Paquier wrote: > On Thu, Mar 05, 2020 at 05:57:07PM +0100, Julien Rouhaud wrote: > > I agree that the approach wasn't quite robust. I'll try to look at adding a > > new command for isolationtester, but that's probably not something we want > > to

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-03-06 Thread Kartyshov Ivan
On 2020-03-06 08:54, Kyotaro Horiguchi wrote: The syntax seems getting confused. What happens if we typed in the command "WAIT FOR TIMESTAMP '...' UNTIL TIMESTAMP ''"? It seems to me the options is useles. Couldn't the TIMEOUT option be a part of event? I know gram.y doesn't accept that

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

2020-03-06 Thread Andy Fan
Upload the newest patch so that the cfbot can pass. The last patch failed because some explain without the (cost off). I'm still on the way to figure out how to handle aggregation calls without aggregation path. Probably we can get there by hacking some ExprEvalPushStep for Aggref node. But

Re: logical copy_replication_slot issues

2020-03-06 Thread Arseny Sher
I wrote: > It looks good to me now. After lying for some time in my head it reminded me that CreateInitDecodingContext not only pegs the LSN, but also xmin, so attached makes a minor comment correction. While taking a look at the nearby code it seemed weird to me that

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

2020-03-06 Thread Fujii Masao
On 2020/03/06 0:45, Magnus Hagander wrote: On Wed, Mar 4, 2020 at 11:15 PM Peter Eisentraut wrote: On 2020-03-05 05:53, Fujii Masao wrote: Or, as another approach, it might be worth considering to make the server always estimate the total backup size whether --progress is specified or

Re: Making psql error out on output failures

2020-03-06 Thread Daniel Verite
David Zhang wrote: > Thanks for your review, now the new patch with the error message in PG > style is attached. The current status of the patch is "Needs review" at https://commitfest.postgresql.org/27/2400/ If there's no more review to do, would you consider moving it to Ready for

Re: backup manifests

2020-03-06 Thread Suraj Kharage
Thanks, Robert. 1: Getting below error while compiling 0002 patch. edb@localhost:postgres$ mi > mi.log basebackup.c: In function ‘AddFileToManifest’: basebackup.c:1052:6: error: ‘pathname’ undeclared (first use in this function) pathname); ^ basebackup.c:1052:6: note: each undeclared

Re: Psql patch to show access methods info

2020-03-06 Thread Alexander Korotkov
On Fri, Mar 6, 2020 at 7:10 AM vignesh C wrote: > I feel your explanation sounds fair to me. Thanks. I've also revised tab-completion code. I'm going to push this if no objections. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

RE: Conflict handling for COPY FROM

2020-03-06 Thread asaba.takan...@fujitsu.com
Hello Surafel, Sorry for my late reply. From: Surafel Temesgen >On Thu, Dec 12, 2019 at 7:51 AM mailto:asaba.takan...@fujitsu.com > wrote: >>2. I have a question about copy meta-command. >>When I executed copy meta-command, output wasn't displayed. >>Does it

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

2020-03-06 Thread Michael Paquier
On Thu, Mar 05, 2020 at 11:09:06PM -0300, Alvaro Herrera wrote: > Hmm, doesn't the CF bot already validate the MSVC build? > > Splitting in two seems all right, but I think one commit that introduces > dead code is not great. It may make more sense to have one commit for > common/archive.c, and

Re: SQL/JSON: functions

2020-03-06 Thread Pavel Stehule
út 3. 3. 2020 v 0:24 odesílatel Nikita Glukhov napsal: > On 03.03.2020 2:12, Erik Rijkers wrote: > > > On 2020-03-02 23:33, Nikita Glukhov wrote: > >> Attached 42th version of the patches. > > > >> v1-0001-Add-jsonpath-pg-modifier-for-enabling-extensions.patch > >>