RE: [HACKERS] logical decoding of two-phase transactions

2021-03-05 Thread osumi.takami...@fujitsu.com
Hi On Saturday, March 6, 2021 10:49 AM Peter Smith wrote: > Please find attached the latest patch set v50* When I read throught the patch set, I found there is a wierd errmsg in apply_handle_begin_prepare(), which seems a mistake. File :

Re: Different compression methods for FPI

2021-03-05 Thread Andrey Borodin
> 1 марта 2021 г., в 10:03, Justin Pryzby написал(а): Justin, Michael, thanks for comments! As far as I understood TODO list for the patch looks as follows: 1. Reuse compression API of other patches. But which one? Or should I invent new one? "compressamapi.h" from "custom compression

Re: Some regular-expression performance hacking

2021-03-05 Thread Joel Jacobson
On Fri, Feb 26, 2021, at 19:55, Tom Lane wrote: > "Joel Jacobson" writes: > > On Fri, Feb 26, 2021, at 01:16, Tom Lane wrote: > >> 0007-smarter-regex-allocation-2.patch > > > I've successfully tested this patch. > > Cool, thanks for testing! I thought it would be interesting to see if any

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

2021-03-05 Thread Zhihong Yu
For v4-0002-some-fixups.patch : + if (client_connection_check_interval > 0) + enable_timeout_after(CLIENT_CONNECTION_CHECK_TIMEOUT, + /* Start timeout for checking if the client has gone away if necessary. */ + if (client_connection_check_interval) It would be better if the

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

2021-03-05 Thread Thomas Munro
On Mon, Mar 1, 2021 at 6:18 PM Thomas Munro wrote: > I've done a quick rebase of this the patch and added it to the > commitfest. No other changes. Several things were mentioned earlier > that still need to be tidied up. Rebased again due to bitrot. This time I did some actual work: 1. I

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-03-05 Thread Joel Jacobson
On Fri, Mar 5, 2021, at 20:46, Joel Jacobson wrote: > My conclusion is that we should use setof int4range[] as the return value for > regexp_positions(). If acceptable by the project, it be even nicer if we could just return the suggested composite type. I don't see any existing catalog

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Kohei KaiGai
2021年3月6日(土) 11:21 Tom Lane : > > Kohei KaiGai writes: > > 2021年3月6日(土) 1:41 Tom Lane : > >> Scanning the code, I have a couple of gripes. I'm not sure it's > >> a good plan to just send the "header" field raw like that --- > >> would breaking it into a dimension field and a point bool be > >>

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Tom Lane
Kohei KaiGai writes: > 2021年3月6日(土) 1:41 Tom Lane : >> Scanning the code, I have a couple of gripes. I'm not sure it's >> a good plan to just send the "header" field raw like that --- >> would breaking it into a dimension field and a point bool be >> better? In any case, the receive function

Re: DROP INDEX CONCURRENTLY on partitioned index

2021-03-05 Thread Michael Paquier
On Fri, Mar 05, 2021 at 09:27:05AM -0500, David Steele wrote: > It appears there are still some issues to be resolved with this patch, but > the next step seems to be for you to have a look at Justin's most recent > patch. Not sure if I'll be able to do that by the end of this month. Looking

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Kohei KaiGai
2021年3月6日(土) 1:41 Tom Lane : > > Kohei KaiGai writes: > > Thanks, the attached patch add cube--1.5 for binary send/recv functions and > > modification of cube type using the new ALTER TYPE. > > Hm, that was already superseded by events (112d411fb). > As long as we get this done for v14, we can

Re: Disallow SSL compression?

2021-03-05 Thread Michael Paquier
On Fri, Mar 05, 2021 at 05:44:20PM +0100, Magnus Hagander wrote: > We've broken stats views before. While it'd be nice if we could group > multiple breakages at the same time, I don't think it's that > important. Better to get rid of it once and for all from as many > places as possible. Okay,

Re: 011_crash_recovery.pl intermittently fails

2021-03-05 Thread Michael Paquier
On Fri, Mar 05, 2021 at 11:16:55AM -0500, Tom Lane wrote: > That would have uncertain effects on other TAP tests, so I'm disinclined > to do it that way. +1. There may be tests out-of-core that rely on this value as default. -- Michael signature.asc Description: PGP signature

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2021-03-05 Thread Alvaro Herrera
v33 was indeed marked a pass by cfbot. However, it only *builds* the test program, it does not *run* it. I guess we'll have to wait for the buildfarm to tell us more. In the meantime, I implemented PQsendQuery() as callable in pipeline mode; it does that by using the extended-query protocol

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2021-03-05 Thread Zhihong Yu
Hi, + \gset and \aset cannot be used + pipeline mode, since query results are not immediately 'used pipeline mode' -> 'used in pipeline mode' --- /dev/null +++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c @@ -0,0 +1,1144 @@ +/* + *

Re: Fix DROP TABLESPACE on Windows with ProcSignalBarrier?

2021-03-05 Thread Daniel Gustafsson
> On 3 Mar 2021, at 23:19, Thomas Munro wrote: > On Thu, Mar 4, 2021 at 4:18 AM Daniel Gustafsson wrote: >> Since there is no way to get make the first destroy_tablespace_directories >> call >> fail on purpose in testing, the assertion coverage may have limited use >> though? > > There is:

Re: Extend more usecase for planning time partition pruning and init partition pruning.

2021-03-05 Thread Andy Fan
Hi Amit: Thanks for your review! On Thu, Mar 4, 2021 at 5:07 PM Amit Langote wrote: > Hi Andy, > > On Sun, Jan 24, 2021 at 7:34 PM Andy Fan wrote: > > I recently found a use case like this. SELECT * FROM p, q WHERE > p.partkey = > > q.colx AND (q.colx = $1 OR q.colx = $2); Then we can't

Re: Keep notnullattrs in RelOptInfo (Was part of UniqueKey patch series)

2021-03-05 Thread Andy Fan
On Fri, Mar 5, 2021 at 4:16 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Fri, Mar 05, 2021 at 10:22:45AM +0800, Andy Fan wrote: > > > > I checked again and found I do miss the check on JoinExpr->quals. I > have > > > > fixed it in v3 patch. Thanks for the review! > > > > > > > > In the

Re: Allow matching whole DN from a client certificate

2021-03-05 Thread Andrew Dunstan
On 3/4/21 2:16 PM, Joel Jacobson wrote: > On Sat, Jan 30, 2021, at 22:18, Andrew Dunstan wrote: >> ssl-match-client-cert-dn-v3.patch > > Spelling error of "conjunction": > +   This option is probably best used in comjunction with a > username map. > > Yeah, fixed this, added a bit more

Re: CI/windows docker vs "am a service" autodetection on windows

2021-03-05 Thread Andres Freund
Hi, On 2021-03-05 10:57:52 -0800, Andres Freund wrote: > On 2021-03-04 12:48:59 -0800, Andres Freund wrote: > > On 2021-03-04 21:36:23 +0100, Magnus Hagander wrote: > > > > I think that's a good answer for pg_ctl - not so sure about postgres > > > > itself, at least once it's up and running. I

Re: Nicer error when connecting to standby with hot_standby=off

2021-03-05 Thread Alvaro Herrera
On 2021-Mar-05, James Coleman wrote: > Do you have any thoughts on what you'd like to see the message be? I > could change the PM_RECOVERY (without hot standby enabled) to return > CAC_RECOVERY which would give us the message "the database system is > in recovery mode", but that would be a change

Re: Nicer error when connecting to standby with hot_standby=off

2021-03-05 Thread James Coleman
On Fri, Mar 5, 2021 at 12:36 PM Fujii Masao wrote: > > > > On 2021/03/05 22:45, David Steele wrote: > > Hi Fujii, > > > > On 9/8/20 1:17 PM, James Coleman wrote: > >> On Tue, Aug 18, 2020 at 12:25 PM Fujii Masao > >> wrote: > >>> Thanks for updating the patch! But it failed to be applied to the

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-03-05 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 01:12, Mark Dilger wrote: > I like the idea so I did a bit of testing. I think the following should not > error, but does: > > +SELECT regexp_positions('foObARbEqUEbAz', $re$(?=beque)$re$, 'i'); > +ERROR: range lower bound must be less than or equal to range upper bound

Re: PROXY protocol support

2021-03-05 Thread Jacob Champion
On Fri, 2021-03-05 at 10:22 +0100, Magnus Hagander wrote: > On Fri, Mar 5, 2021 at 12:21 AM Jacob Champion wrote: > > A small nitpick on the current separate-port PoC is that I'm forced to > > set up a "regular" TCP port, even if I only want the PROXY behavior. > > Yeah. I'm not sure there's a

Re: CI/windows docker vs "am a service" autodetection on windows

2021-03-05 Thread Andres Freund
Hi, On 2021-03-04 12:48:59 -0800, Andres Freund wrote: > On 2021-03-04 21:36:23 +0100, Magnus Hagander wrote: > > > I think that's a good answer for pg_ctl - not so sure about postgres > > > itself, at least once it's up and running. I don't know what lead to all > > > of this autodetection

Re: We should stop telling users to "vacuum that database in single-user mode"

2021-03-05 Thread Alvaro Herrera
On 2021-Mar-02, David Rowley wrote: > However, I wonder if it's worth going a few steps further to try and > reduce the chances of that message being seen in the first place. > Maybe it's worth considering ditching any (auto)vacuum cost limits for > any table which is within X transaction from

Re: Nicer error when connecting to standby with hot_standby=off

2021-03-05 Thread Fujii Masao
On 2021/03/05 22:45, David Steele wrote: Hi Fujii, On 9/8/20 1:17 PM, James Coleman wrote: On Tue, Aug 18, 2020 at 12:25 PM Fujii Masao wrote: Thanks for updating the patch! But it failed to be applied to the master branch cleanly because of the recent commit 0038f94387. So could you

Re: [PoC] Non-volatile WAL buffer

2021-03-05 Thread Tomas Vondra
Hello Takashi-san, On 3/5/21 9:08 AM, Takashi Menjo wrote: > Hi Tomas, > > Thank you so much for your report. I have read it with great interest. > > Your conclusion sounds reasonable to me. My patchset you call "NTT / > segments" got as good performance as "NTT / buffer" patchset. I have >

Re: n_mod_since_analyze isn't reset at table truncation

2021-03-05 Thread Julien Rouhaud
On Fri, Mar 05, 2021 at 10:43:51PM +0900, Masahiko Sawada wrote: > > I think we can use n_live_tup for that but since it's an estimation > value it doesn't necessarily have the same result as DELETE and I'm > not sure it's reliable. I agree that it's not 100% reliable, but in my experience those

Re: Allow an alias to be attached directly to a JOIN ... USING

2021-03-05 Thread David Steele
On 11/14/20 3:49 AM, Peter Eisentraut wrote: On 2020-11-10 16:15, Georgios Kokolatos wrote: I noticed that this patch fails on the cfbot. For this, I changed the status to: 'Waiting on Author'. Cheers, //Georgios The new status of this patch is: Waiting on Author Here is a rebased and

RE: [POC] Fast COPY FROM command for the table with foreign partitions

2021-03-05 Thread tsunakawa.ta...@fujitsu.com
From: Justin Pryzby > I think this change to the regression tests is suspicous: > > -CONTEXT: remote SQL command: INSERT INTO public.loc2(f1, f2) VALUES > ($1, $2) > -COPY rem2, line 1: "-1 xyzzy" > +CONTEXT: COPY loc2, line 1: "-1 xyzzy" > +remote SQL command: COPY public.loc2(f1, f2)

Re: Disallow SSL compression?

2021-03-05 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 1:37 PM Michael Paquier wrote: > > On Fri, Mar 05, 2021 at 01:21:01PM +0100, Daniel Gustafsson wrote: > > On 5 Mar 2021, at 08:04, Michael Paquier wrote: > >> FWIW, I would vote to nuke it from all those places, reducing a bit > >> pg_stat_get_activity() while on it.

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Tom Lane
Kohei KaiGai writes: > Thanks, the attached patch add cube--1.5 for binary send/recv functions and > modification of cube type using the new ALTER TYPE. Hm, that was already superseded by events (112d411fb). As long as we get this done for v14, we can just treat it as an add-on to cube 1.5, so

Re: How to retain lesser paths at add_path()?

2021-03-05 Thread David Steele
On 11/5/20 10:41 AM, Dmitry Dolgov wrote: On Tue, Jan 14, 2020 at 12:46:02AM +0900, Kohei KaiGai wrote: The v2 patch is attached. Thanks for the patch! I had a quick look at it and have a few questions: KaiGai, any thoughts on Dmitry's questions? Regards, -- -David da...@pgmasters.net

Re: pgbench - add pseudo-random permutation function

2021-03-05 Thread Alvaro Herrera
Hi David On 2021-Mar-05, David Steele wrote: > On 4/2/20 3:01 AM, Alvaro Herrera wrote: > > On 2020-Apr-02, Fabien COELHO wrote: > > > > > > I'm planning to mark this patch RwF on April 8 and I suggest you > > > > resubmit if you are able to get some consensus. > > > > > > People interested in

Re: contrib/cube - binary input/output handlers

2021-03-05 Thread Kohei KaiGai
Thanks, the attached patch add cube--1.5 for binary send/recv functions and modification of cube type using the new ALTER TYPE. Best regards, 2021年3月4日(木) 0:45 Tom Lane : > > I wrote: > > You can add the I/O functions with ALTER TYPE nowadays. > > To be concrete, see

Re: 011_crash_recovery.pl intermittently fails

2021-03-05 Thread Tom Lane
Kyotaro Horiguchi writes: > So I think we need to remove the shared_buffers setting for the > allows_streamig case in PostgresNode.pm That would have uncertain effects on other TAP tests, so I'm disinclined to do it that way. 011_crash_recovery.pl doesn't actually use a standby server, so just

Re: [PATCH] remove deprecated v8.2 containment operators

2021-03-05 Thread Tom Lane
Justin Pryzby writes: > On Thu, Mar 04, 2021 at 08:58:39PM -0500, Tom Lane wrote: >> I'm confused by why this patch is only dropping the operators' >> opclass-membership links. Don't we want to actually DROP OPERATOR >> too? > Okay Pushed. Since hstore already had a new-in-v14 edition, I just

Re: problem with RETURNING and update row movement

2021-03-05 Thread David Steele
On 10/30/20 6:00 AM, Amit Langote wrote: The question I guess is whether that thread must conclude before the fix here can be committed. Indeed. But it seems like there is a candidate patch on [1] though that thread has also stalled. I'll try to get some status on that thread but the

Re: shared-memory based stats collector

2021-03-05 Thread Fujii Masao
On 2021/03/05 17:18, Kyotaro Horiguchi wrote: At Thu, 21 Jan 2021 12:03:48 +0900 (JST), Kyotaro Horiguchi wrote in Commit 960869da08 (database statistics) conflicted with this. Rebased. I'm concerned about the behavior that pgstat_update_connstats calls GetCurrentTimestamp() every time

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-03-05 Thread Andreas Karlsson
On 3/4/21 4:40 PM, Tom Lane wrote: I wonder if a 2-D integer array wouldn't be a better idea, ie {{startpos1,length1},{startpos2,length2},...}. My experience with working with parallel arrays in SQL has been unpleasant. Hm, I can see your point but on the other hand I can't say my

Re: Which PG version does CVE-2021-20229 affected?

2021-03-05 Thread Tom Lane
Michael Banck writes: > On Fri, Mar 05, 2021 at 04:38:17PM +0900, Michael Paquier wrote: >> This link includes incorrect information. CVE-2021-20229 is only a >> problem in 13.0 and 13.1, fixed in 13.2. Please see for example here: >> https://www.postgresql.org/support/security/ > Probably

Re: PoC/WIP: Extended statistics on expressions

2021-03-05 Thread Dean Rasheed
On Thu, 4 Mar 2021 at 22:16, Tomas Vondra wrote: > > Attached is a slightly improved version of the patch series, addressing > most of the issues raised in the previous message. Cool. Sorry for the delay replying. > 0003-Extended-statistics-on-expressions-20210304.patch > > Mostly unchanged,

Re: DROP INDEX CONCURRENTLY on partitioned index

2021-03-05 Thread David Steele
Hi Michael, On 10/27/20 8:44 PM, Justin Pryzby wrote: 3. I have a patch which changes index_drop() to "expand" a partitioned index into its list of children. Each of these becomes a List: | indexId, heapId, userIndexRelation, userHeapRelation, heaplocktag, heaprelid, indexrelid The same

Re: pgbench - add pseudo-random permutation function

2021-03-05 Thread David Steele
Hi Álvaro, On 4/2/20 3:01 AM, Alvaro Herrera wrote: On 2020-Apr-02, Fabien COELHO wrote: I'm planning to mark this patch RwF on April 8 and I suggest you resubmit if you are able to get some consensus. People interested in non-uniform benchmarks would see the point. Why many people would be

Re: A reloption for partitioned tables - parallel_workers

2021-03-05 Thread Laurenz Albe
On Fri, 2021-03-05 at 22:55 +0900, Amit Langote wrote: > On Fri, Mar 5, 2021 at 10:47 PM Laurenz Albe wrote: > > On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > > > For example, with the attached PoC patch: > > > > I have incorporated your POC patch and added a regression test. > > > >

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

2021-03-05 Thread David Steele
Hi Georgios, On 9/13/20 12:04 PM, Nikolay Shaplov wrote: В письме от понедельник, 20 июля 2020 г. 18:36:44 MSK пользователь Georgios Kokolatos написал: thank you for the patch. It applies cleanly, compiles and passes check, check-world. Thank you for reviewing efforts. Please find new

Re: A reloption for partitioned tables - parallel_workers

2021-03-05 Thread Amit Langote
On Fri, Mar 5, 2021 at 10:47 PM Laurenz Albe wrote: > On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > > For example, with the attached PoC patch: > > I have incorporated your POC patch and added a regression test. > > I didn't test it thoroughly though. Thanks. Although, I wonder if we

Re: PROXY protocol support

2021-03-05 Thread Álvaro Hernández
On 5/3/21 10:03, Magnus Hagander wrote: > On Fri, Mar 5, 2021 at 1:33 AM Álvaro Hernández wrote: >> >> >> On 5/3/21 0:21, Jacob Champion wrote: >>> On Thu, 2021-03-04 at 21:45 +0100, Magnus Hagander wrote: On Thu, Mar 4, 2021 at 9:07 PM Jacob Champion wrote: > Idle thought I had

Re: A reloption for partitioned tables - parallel_workers

2021-03-05 Thread Laurenz Albe
On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > For example, with the attached PoC patch: I have incorporated your POC patch and added a regression test. I didn't test it thoroughly though. Yours, Laurenz Albe From 34f7da98b34bc1dbf7daca9e2ca6055c80d77f43 Mon Sep 17 00:00:00 2001 From:

Re: Nicer error when connecting to standby with hot_standby=off

2021-03-05 Thread David Steele
Hi Fujii, On 9/8/20 1:17 PM, James Coleman wrote: On Tue, Aug 18, 2020 at 12:25 PM Fujii Masao wrote: Thanks for updating the patch! But it failed to be applied to the master branch cleanly because of the recent commit 0038f94387. So could you update the patch again? Updated patch attached.

Re: n_mod_since_analyze isn't reset at table truncation

2021-03-05 Thread Masahiko Sawada
On Fri, Mar 5, 2021 at 6:51 PM Julien Rouhaud wrote: > > On Fri, Mar 05, 2021 at 06:07:05PM +0900, Fujii Masao wrote: > > > > On 2021/03/05 15:59, Julien Rouhaud wrote: > > > > > > I don't especially want to defer autoanalyze in that case. But an > > > autoanalyze > > > happening quickly after

Re: libpq debug log

2021-03-05 Thread alvhe...@alvh.no-ip.org
On 2021-Mar-05, tsunakawa.ta...@fujitsu.com wrote: > From: Tom Lane > > But I think passing the message start address explicitly might be > > better than having it understand the buffering behavior in enough > > detail to know where to find the message. Part of the point here > > (IMO) is to

Re: Which PG version does CVE-2021-20229 affected?

2021-03-05 Thread Michael Banck
On Fri, Mar 05, 2021 at 04:38:17PM +0900, Michael Paquier wrote: > On Fri, Mar 05, 2021 at 12:32:43AM -0700, bchen90 wrote: > > NVD link: > > > > https://nvd.nist.gov/vuln/detail/CVE-2021-20229#vulnCurrentDescriptionTitle > > This link includes incorrect information. CVE-2021-20229 is only a >

Re: Parallel INSERT (INTO ... SELECT ...)

2021-03-05 Thread Amit Kapila
On Fri, Mar 5, 2021 at 6:34 PM Greg Nancarrow wrote: > > On Fri, Mar 5, 2021 at 9:35 PM Amit Kapila wrote: > > > > On Fri, Mar 5, 2021 at 8:24 AM Greg Nancarrow wrote: > > > > > > > In patch v21-0003-Add-new-parallel-dml-GUC-and-table-options, we are > > introducing GUC (enable_parallel_dml)

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-03-05 Thread Pavel Stehule
Hi pá 5. 3. 2021 v 13:44 odesílatel Joel Jacobson napsal: > Idea #5: > > Allow disabling canonicalization via optional parameter to range > constructor functions. > I think so rules describing ranges and multirages are long enough, so increasing functionality doesn't look like a practical

RE: libpq debug log

2021-03-05 Thread k.jami...@fujitsu.com
Hi Alvaro-san and Horiguchi-san, CC) Iwata-san, Tsunakawa-san Attached is the V23 of the libpq trace patch. (1) From: Álvaro Herrera > It appears that something is still wrong. I applied lipq pipeline v27 from > [1] > and ran src/test/modules/test_libpq/pipeline singlerow, after patching it

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-03-05 Thread Joel Jacobson
Idea #5: Allow disabling canonicalization via optional parameter to range constructor functions. This would then allow using the range type, to create inclusive/inclusive integer ranges, where lower() and upper() would return what you expect. /Joel

Re: [patch] bit XOR aggregate functions

2021-03-05 Thread Alexey Bashtanov
Hi all, Thanks for your reviews. I've updated my patch to the current master and added a documentation line suggesting using the new function as a checksum. Best regards, Alex On 04/03/2021 17:14, Ibrar Ahmed wrote: On Wed, Mar 3, 2021 at 7:30 PM Peter Eisentraut

Re: Confusing behavior of psql's \e

2021-03-05 Thread Laurenz Albe
On Thu, 2021-03-04 at 16:51 +, Jacob Champion wrote: > > I am not against fixing or improving the behavior, but given the > > fact that we can't portably get less than second precision, it > > seems impossible. > > You could backdate the temporary file, so that any save is guaranteed > to

Re: Disallow SSL compression?

2021-03-05 Thread Michael Paquier
On Fri, Mar 05, 2021 at 01:21:01PM +0100, Daniel Gustafsson wrote: > On 5 Mar 2021, at 08:04, Michael Paquier wrote: >> FWIW, I would vote to nuke it from all those places, reducing a bit >> pg_stat_get_activity() while on it. Keeping it around in the system >> catalogs may cause confusion IMHO,

Re: Disallow SSL compression?

2021-03-05 Thread Daniel Gustafsson
> On 5 Mar 2021, at 08:04, Michael Paquier wrote: > > On Thu, Mar 04, 2021 at 11:52:56PM +0100, Daniel Gustafsson wrote: >> The attached version takes a step further and removes sslcompression from >> pg_conn and just eats the value as there is no use in setting a dummy alue. >> It >> also

Re: POC: GROUP BY optimization

2021-03-05 Thread Pavel Borisov
> Regression (stats_ext) is failing because you forgot to drop the table > created in a test > case (aggregates), It's a bit minor change so the attached patch fixes > that issue. > > https://cirrus-ci.com/task/6704792446697472 > > Thank you very much! -- Best regards, Pavel Borisov Postgres

Re: EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW

2021-03-05 Thread Bharath Rupireddy
On Fri, Mar 5, 2021 at 9:32 AM Japin Li wrote: > On Thu, 04 Mar 2021 at 14:53, Bharath Rupireddy > wrote: > > Thanks! I will look forward for more review comments. > > > > v4-0001-Rearrange-Refresh-Mat-View-Code.patch > - > > +static Oid >

Re: POC: GROUP BY optimization

2021-03-05 Thread Ibrar Ahmed
On Thu, Oct 29, 2020 at 8:15 PM Pavel Borisov wrote: > In case if I'm missing something and Pavel's proposal is significantly >> different from the original patch (if I understand correctly, at the >> moment the latest patch posted here is a rebase and adjusting the old >> patch to work with the

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-05 Thread Masahiro Ikeda
On 2021-03-05 12:47, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote:

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-03-05 Thread Joel Jacobson
On Thu, Mar 4, 2021, at 17:55, Gilles Darold wrote: > I also think that it should return a setof 2-D integer array, an other > solution is to return all start/end positions of an occurrence chained > in an integer array {start1,end1,start2,end2,..}. Hmm. Seems like we've in total managed to

Re: Parallel INSERT (INTO ... SELECT ...)

2021-03-05 Thread Amit Kapila
On Fri, Mar 5, 2021 at 8:24 AM Greg Nancarrow wrote: > In patch v21-0003-Add-new-parallel-dml-GUC-and-table-options, we are introducing GUC (enable_parallel_dml) and table option (parallel_dml_enabled) for this feature. I am a bit worried about using *_dml in the names because it is quite

Re: [HACKERS] logical decoding of two-phase transactions

2021-03-05 Thread vignesh C
On Fri, Mar 5, 2021 at 12:21 PM Ajin Cherian wrote: > > On Thu, Mar 4, 2021 at 9:53 PM Peter Smith wrote: > > > [05a] Now syncing the psf file at prepare time > > The patch v46-0008 does not handle spooling of streaming prepare if > the Subscription is configured for both two-phase and

Re: n_mod_since_analyze isn't reset at table truncation

2021-03-05 Thread Julien Rouhaud
On Fri, Mar 05, 2021 at 06:07:05PM +0900, Fujii Masao wrote: > > On 2021/03/05 15:59, Julien Rouhaud wrote: > > > > I don't especially want to defer autoanalyze in that case. But an > > autoanalyze > > happening quickly after a TRUNCATE is critical for performance, I'd prefer > > to > > find

Re: Printing backtrace of postgres processes

2021-03-05 Thread torikoshia
On 2021-03-04 21:55, Bharath Rupireddy wrote: On Mon, Mar 1, 2021 at 10:43 AM torikoshia wrote: Since the current patch use BackendPidGetProc(), it does not support this feature not only postmaster, logging, and statistics but also checkpointer, background writer, and walwriter. And when I

Re: [PATCH] pgbench: Bug fix for the -d option

2021-03-05 Thread Fujii Masao
On 2021/03/05 16:33, Michael Paquier wrote: On Fri, Mar 05, 2021 at 01:30:11PM +0900, Fujii Masao wrote: if ((env = getenv("PGDATABASE")) != NULL && *env != '\0') dbName = env; - else if (login != NULL && *login != '\0') -

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 12:21 AM Jacob Champion wrote: > > On Thu, 2021-03-04 at 21:45 +0100, Magnus Hagander wrote: > > On Thu, Mar 4, 2021 at 9:07 PM Jacob Champion wrote: > > > Idle thought I had while setting up a local test rig: Are there any > > > compelling cases for allowing PROXY packets

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 12:08 AM Tatsuo Ishii wrote: > > >> On Thu, 2021-03-04 at 10:42 +0900, Tatsuo Ishii wrote: > >> > Is there any formal specification for the "a protocol common and very > >> > light weight in proxies"? > >> > >> See > >> > >>

Re: 011_crash_recovery.pl intermittently fails

2021-03-05 Thread Kyotaro Horiguchi
At Fri, 05 Mar 2021 16:51:17 +0900 (JST), Kyotaro Horiguchi wrote in > The difference comes from the difference of shared_buffers. In the > "allows_streaming" case, PostgresNode::init() *reduces* the number > down to '1MB'(128 blocks) which leads to only 8 XLOGbuffers, which > will very soon be

Re: n_mod_since_analyze isn't reset at table truncation

2021-03-05 Thread Fujii Masao
On 2021/03/05 15:59, Julien Rouhaud wrote: On Fri, Mar 05, 2021 at 03:31:33PM +0900, Fujii Masao wrote: On 2021/03/04 12:40, Julien Rouhaud wrote: In that case, conversely, we want to trigger autoanalyze ASAP because the contents in the table was changed very much? We might want, but

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 1:33 AM Álvaro Hernández wrote: > > > > On 5/3/21 0:21, Jacob Champion wrote: > > On Thu, 2021-03-04 at 21:45 +0100, Magnus Hagander wrote: > >> On Thu, Mar 4, 2021 at 9:07 PM Jacob Champion wrote: > >>> Idle thought I had while setting up a local test rig: Are there any >

Re: PROXY protocol support

2021-03-05 Thread Magnus Hagander
On Fri, Mar 5, 2021 at 12:57 AM Hannu Krosing wrote: > > The current proposal seems to miss the case of transaction pooling > (and statement pooling) where the same established connection > multiplexes transactions / statements from multiple remote clients. Not at all. The current proposal is

Re: 011_crash_recovery.pl intermittently fails

2021-03-05 Thread Thomas Munro
On Fri, Mar 5, 2021 at 5:40 PM Tom Lane wrote: > Thomas Munro writes: > > On Fri, Mar 5, 2021 at 5:10 PM Tom Lane wrote: > >> Alternatively, maybe we can salvage the function's usefulness by making it > >> flush WAL before returning? > > > To make pg_xact_status()'s result reliable, don't you

Re: Is it useful to record whether plans are generic or custom?

2021-03-05 Thread Fujii Masao
On 2021/02/08 14:02, torikoshia wrote: On 2021-02-04 11:19, Kyotaro Horiguchi wrote: At Thu, 04 Feb 2021 10:16:47 +0900, torikoshia wrote in Chengxi Sun, Yamada-san, Horiguchi-san, Thanks for all your comments. Adding only the number of generic plan execution seems acceptable. On Mon,

Re: Is it useful to record whether plans are generic or custom?

2021-03-05 Thread Fujii Masao
On 2021/01/28 8:11, Tatsuro Yamada wrote: Hi Toricoshi-san, On 2021/01/12 20:36, torikoshia wrote: I suppose it would be normal practice to store past results of pg_stat_statements for future comparisons. If this is the case, I think that if we only add the number of generic plan execution,

Re: 011_crash_recovery.pl intermittently fails

2021-03-05 Thread Kyotaro Horiguchi
At Fri, 5 Mar 2021 13:20:53 +0500, Andrey Borodin wrote in > > 5 марта 2021 г., в 13:00, Kyotaro Horiguchi > > написал(а): > > > > The problem records have 15 pages of FPIs. The reduction of their > > size may prevent WAL-buffer wrap around and wal writes. If no wal is > > written the test

Re: 011_crash_recovery.pl failes using wal_block_size=16K

2021-03-05 Thread Kyotaro Horiguchi
Oops! I forgot that the issue starts from this mail. At Thu, 4 Mar 2021 22:34:38 +0800, "walker" wrote in > 011_crash_recovery.pl .. > 1..3 > ok 1 - own xid is in-progress > not ok 2 - new xid after restart is greater > But if I modified something in t/011_crash_recovery.pl, this perl script

Re: 011_crash_recovery.pl intermittently fails

2021-03-05 Thread Andrey Borodin
> 5 марта 2021 г., в 13:00, Kyotaro Horiguchi > написал(а): > > The problem records have 15 pages of FPIs. The reduction of their > size may prevent WAL-buffer wrap around and wal writes. If no wal is > written the test fails. Thanks, I've finally understood the root cause. So, test

Re: Which PG version does CVE-2021-20229 affected?

2021-03-05 Thread Thomas Kellerer
Michael Paquier schrieb am 05.03.2021 um 08:38: > On Fri, Mar 05, 2021 at 12:32:43AM -0700, bchen90 wrote: >> NVD link: >> >> https://nvd.nist.gov/vuln/detail/CVE-2021-20229#vulnCurrentDescriptionTitle > > This link includes incorrect information. CVE-2021-20229 is only a > problem in 13.0 and

Re: Keep notnullattrs in RelOptInfo (Was part of UniqueKey patch series)

2021-03-05 Thread Dmitry Dolgov
> On Fri, Mar 05, 2021 at 10:22:45AM +0800, Andy Fan wrote: > > > I checked again and found I do miss the check on JoinExpr->quals. I have > > > fixed it in v3 patch. Thanks for the review! > > > > > > In the attached v3, commit 1 is the real patch, and commit 2 is just add > > > some logs to

Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

2021-03-05 Thread Julien Rouhaud
On Fri, Mar 5, 2021 at 9:28 AM Michael Paquier wrote: > > On Thu, Mar 04, 2021 at 06:37:56PM +0100, Juan José Santamaría Flecha wrote: > > LGTM. > > Thanks. I have tested more combinations of options, came back a bit > to the documentation for buildenv.pl where copying the values from the > docs

Re: [PoC] Non-volatile WAL buffer

2021-03-05 Thread Takashi Menjo
Hi Tomas, Thank you so much for your report. I have read it with great interest. Your conclusion sounds reasonable to me. My patchset you call "NTT / segments" got as good performance as "NTT / buffer" patchset. I have been worried that calling mmap/munmap for each WAL segment file could have a

Re: 011_crash_recovery.pl intermittently fails

2021-03-05 Thread Kyotaro Horiguchi
(Sorry for my slippery fingers.) At Fri, 5 Mar 2021 10:07:06 +0500, Andrey Borodin wrote in > Maybe it's offtopic here, but anyway... > While working on "lz4 for FPIs" I've noticed that this test fails with > wal_compression = on. > I did not investigate the case at that moment, but I think