Re: Increase value of OUTER_VAR

2021-03-03 Thread Andrey Lepikhov
On 3/3/21 12:52, Julien Rouhaud wrote: On Wed, Mar 3, 2021 at 4:57 PM Amit Langote wrote: On Wed, Mar 3, 2021 at 5:52 PM David Rowley wrote: Something like 1 million seems like a more realistic limit to me. That might still be on the high side, but it'll likely mean we'd not need to revisit

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

2021-03-03 Thread tsunakawa.ta...@fujitsu.com
From: Zhihong Yu > This feature enables bulk COPY into foreign table in the case of > multi inserts is possible > > 'is possible' -> 'if possible' > > FDWAPI was extended by next routines: > > next routines -> the following routines Thank you, fixed slightly differently. (I feel the need for

Re: Identify missing publications from publisher while create/alter subscription.

2021-03-03 Thread Bharath Rupireddy
On Wed, Mar 3, 2021 at 8:59 AM Euler Taveira wrote: > > On Wed, Feb 3, 2021, at 2:13 AM, Bharath Rupireddy wrote: > > On Mon, Jan 25, 2021 at 10:32 PM vignesh C wrote: > > > If a publication which does not exist is specified during create > > subscription, then we should throw an error similar t

Re: Shared memory size computation oversight?

2021-03-03 Thread Julien Rouhaud
On Thu, Mar 04, 2021 at 04:05:10PM +0900, Michael Paquier wrote: > On Thu, Mar 04, 2021 at 12:40:52AM +0800, Julien Rouhaud wrote: > > On Wed, Mar 03, 2021 at 11:23:54AM -0500, Tom Lane wrote: > >> I have not looked at this patch, but I think the concern is basically that > >> if we have space-esti

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-03 Thread Kyotaro Horiguchi
At Thu, 4 Mar 2021 11:18:42 +0900, Michael Paquier wrote in > On Thu, Mar 04, 2021 at 10:28:31AM +0900, Kyotaro Horiguchi wrote: > > read_local_xlog_page() works as a part of logical decoding and has > > responsibility to update ThisTimeLineID properly. As the comment in > > the function, it is

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

2021-03-03 Thread Masahiro Ikeda
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: On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahi

Re: Shared memory size computation oversight?

2021-03-03 Thread Michael Paquier
On Thu, Mar 04, 2021 at 12:40:52AM +0800, Julien Rouhaud wrote: > On Wed, Mar 03, 2021 at 11:23:54AM -0500, Tom Lane wrote: >> I have not looked at this patch, but I think the concern is basically that >> if we have space-estimation infrastructure that misestimates what it is >> supposed to estimat

Re: [PATCH] Support empty ranges with bounds information

2021-03-03 Thread Jeff Davis
On Tue, 2021-03-02 at 18:52 +0100, Joel Jacobson wrote: > and the theory is only cute until you face the ugly reality. There are a lot of range functions and operators, as well as different kinds of ranges (continuous and discrete), and multiranges too. That means a lot of ways to combine operatio

Re: EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW

2021-03-03 Thread Bharath Rupireddy
On Thu, Mar 4, 2021 at 11:41 AM Japin Li wrote: > On Wed, 03 Mar 2021 at 20:56, David Steele wrote: > > Do you know if you will have time to review this patch during the > > current commitfest? > > > > Sorry for the late reply! I think I have time to review this patch > and I will do it later. T

Re: Improvements and additions to COPY progress reporting

2021-03-03 Thread Bharath Rupireddy
On Wed, Feb 24, 2021 at 1:23 PM Justin Pryzby wrote: > > On Sun, Feb 21, 2021 at 08:10:09PM +0100, Matthias van de Meent wrote: > > Subject: [PATCH v9 1/3] Add progress-reported components for COPY progress > > reporting > > > /* Increment amount of processed tuples and upda

Re: Make mesage at end-of-recovery less scary.

2021-03-03 Thread Kyotaro Horiguchi
At Wed, 3 Mar 2021 11:14:20 -0500, David Steele wrote in > Hi Kyotaro, > > On 3/27/20 10:25 PM, James Coleman wrote: > > On Thu, Mar 26, 2020 at 12:41 PM Robert Haas > > wrote: > >> > >> I'm just spitballing here, but it would be really good if there's a > >> way to know definitely whether or n

Re: Improvements and additions to COPY progress reporting

2021-03-03 Thread Bharath Rupireddy
On Thu, Feb 25, 2021 at 1:44 PM Michael Paquier wrote: > > On Wed, Feb 24, 2021 at 01:53:03AM -0600, Justin Pryzby wrote: > > On Sun, Feb 21, 2021 at 08:10:09PM +0100, Matthias van de Meent wrote: > > I think these should say that they report their progress *in* the view (not > > "to"): > > > > >

Re: proposal - psql - use pager for \watch command

2021-03-03 Thread Pavel Stehule
Hi Here is a little bit updated patch - detection of end of any child process cannot be used on WIN32. I am not an expert on this platform, but from what I read about it, there is no easy solution. The problem is in _popen function. We lost the handle of the created process, and it is not possible

Re: [PATCH] Support empty ranges with bounds information

2021-03-03 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 21:58, Mark Dilger wrote: > Part of what was strange about arguing against your patch is that I kind of > wanted the feature to work that way back when it originally got written. > (Not to say that it *should* have worked that way, just that part of me > wanted it.) Tha

Re: EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW

2021-03-03 Thread Japin Li
On Wed, 03 Mar 2021 at 20:56, David Steele wrote: > Do you know if you will have time to review this patch during the > current commitfest? > Sorry for the late reply! I think I have time to review this patch and I will do it later. -- Regrads, Japin Li. ChengDu WenWu Information Technology C

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-03 Thread Amit Langote
On Tue, Oct 20, 2020 at 9:46 PM Amit Langote wrote: > On Tue, Oct 20, 2020 at 4:05 PM Andy Fan wrote: > > On Wed, Oct 14, 2020 at 11:26 AM Andy Fan wrote: > >> On Mon, Oct 12, 2020 at 4:37 PM Amit Langote > >> wrote: > >>> I think we should remove this duplicative logic and return the > >>> ge

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-03 Thread Fujii Masao
On 2021/03/04 10:28, Kyotaro Horiguchi wrote: At Wed, 3 Mar 2021 14:56:25 -0800, Soumyadeep Chakraborty wrote in On 2021/03/03 17:46, Heikki Linnakangas wrote: I think it should be reset even earlier, inside XlogReadTwoPhaseData() probably. With your patch, doesn't the LogStandbySnapshot(

Re: How to provide Documentation Feedback

2021-03-03 Thread Ajay Patel
Thanks tom. Much appreciated. On Thu, Mar 4, 2021 at 12:12 AM Tom Lane wrote: > Ajay Patel writes: > > What would be the best way to provide feedback on the PostgreSQL > > documentation? Is it a specific email group or email ID? > > pgsql-d...@lists.postgresql.org is the place. > >

Re: How to provide Documentation Feedback

2021-03-03 Thread Tom Lane
Ajay Patel writes: > What would be the best way to provide feedback on the PostgreSQL > documentation? Is it a specific email group or email ID? pgsql-d...@lists.postgresql.org is the place. regards, tom lane

How to provide Documentation Feedback

2021-03-03 Thread Ajay Patel
Hi PG Team, What would be the best way to provide feedback on the PostgreSQL documentation? Is it a specific email group or email ID? Please if you could guide me. Warm regards, Ajay Patel

Re: Make Append Cost aware of some run time partition prune case

2021-03-03 Thread Andy Fan
> > I have implemented a new one, which only handles 1 level of partitioned > table, and > only 1 partition key. and only handle the eq operators like partkey = $1 > / partkey in ($1, $2) > / parkey = $1 or partkey = $2; The patch works well in my user case. I > can send > one on the latest mast

Re: Asynchronous Append on postgres_fdw nodes.

2021-03-03 Thread Etsuro Fujita
On Mon, Mar 1, 2021 at 5:56 PM Etsuro Fujita wrote: > Here is an updated version of the patch. Another thing I'm concerned about in the postgres_fdw part is the case where all/many postgres_fdw ForeignScans of an Append use the same connection, because in that case those ForeignScans are executed

RE: Avoid CommandCounterIncrement in RI trigger when INSERT INTO referencing table

2021-03-03 Thread houzj.f...@fujitsu.com
> From the wiki[1], CCI is to let statements can not see the rows they modify. Sorry, a typo here "not". I meant CCI is to let statements can see the rows they modify. Best regards, houzj

Re: n_mod_since_analyze isn't reset at table truncation

2021-03-03 Thread Julien Rouhaud
On Thu, Mar 04, 2021 at 12:21:14PM +0900, Fujii Masao wrote: > > > On 2021/03/04 11:24, Julien Rouhaud wrote: > > On Thu, Mar 04, 2021 at 10:35:19AM +0900, Masahiko Sawada wrote: > > > > > > While reviewing "autoanalyze on partitioned table" patch, I realized > > > that pg_stat_xxx_tables.n_mod_

RE: Avoid CommandCounterIncrement in RI trigger when INSERT INTO referencing table

2021-03-03 Thread houzj.f...@fujitsu.com
Hi, > Why do we have to increment the command ID when the INSERT's target table > is a referenced table? Please refer to the explanation below. > > And INSERT command only have one target table, the modification on > > other tables can happen in the following cases. > > > > 1) has modifyingcte w

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

2021-03-03 Thread Amit Kapila
On Thu, Mar 4, 2021 at 7:16 AM Greg Nancarrow wrote: > > On Thu, Mar 4, 2021 at 1:07 AM Dilip Kumar wrote: > > > > On Wed, Mar 3, 2021 at 5:50 PM Greg Nancarrow wrote: > > > > > > Asserts are normally only enabled in a debug-build, so for a > > > release-build that Assert has no effect. > > > Th

Re: n_mod_since_analyze isn't reset at table truncation

2021-03-03 Thread Fujii Masao
On 2021/03/04 11:24, Julien Rouhaud wrote: On Thu, Mar 04, 2021 at 10:35:19AM +0900, Masahiko Sawada wrote: While reviewing "autoanalyze on partitioned table" patch, I realized that pg_stat_xxx_tables.n_mod_since_analyze is not reset at TRUNCATE. On the other hand, n_ins_since_vacuum is rese

RE: Avoid CommandCounterIncrement in RI trigger when INSERT INTO referencing table

2021-03-03 Thread tsunakawa.ta...@fujitsu.com
Excuse me for asking probably stupid questions... From: houzj.f...@fujitsu.com > As far as I can see, it’s only necessary to increment command id when the > INSERT command modified the referenced table. Why do we have to increment the command ID when the INSERT's target table is a referenced ta

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

2021-03-03 Thread Zhihong Yu
Hi, This feature enables bulk COPY into foreign table in the case of multi inserts is possible 'is possible' -> 'if possible' FDWAPI was extended by next routines: next routines -> the following routines For postgresExecForeignCopy(): + if ((!OK && PQresultStatus(res) != PGRES_FATAL_ERR

Re: Remove page-read callback from XLogReaderState.

2021-03-03 Thread Kyotaro Horiguchi
A recent commot about LSN_FORMAT_ARGS conflicted this. Just rebased. regards -- Kyotaro Horiguchi NTT Open Source Software Center >From b23cb65696a42e32b657f12bcf2355acd3100084 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Thu, 5 Sep 2019 20:21:55 +0900 Subject: [PATCH v17 1/4] Move cal

Re: Let people set host(no)ssl settings from initdb

2021-03-03 Thread Michael Paquier
On Wed, Mar 03, 2021 at 03:07:30PM +0100, Peter Eisentraut wrote: > I think there is enough sustained opposition to this patch that we can mark > this as rejected in the commitfest. +1. -- Michael signature.asc Description: PGP signature

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

2021-03-03 Thread tsunakawa.ta...@fujitsu.com
From: Justin Pryzby > Find attached some language fixes. Thanks a lot! (I wish there will be some tool like "pgEnglish" that corrects English in code comments and docs.) > |/* Do this to ensure we've pumped libpq back to idle state */ > > I don't know why you mean by "pumped"? I cha

Re: n_mod_since_analyze isn't reset at table truncation

2021-03-03 Thread Julien Rouhaud
On Thu, Mar 04, 2021 at 10:35:19AM +0900, Masahiko Sawada wrote: > > While reviewing "autoanalyze on partitioned table" patch, I realized > that pg_stat_xxx_tables.n_mod_since_analyze is not reset at TRUNCATE. > On the other hand, n_ins_since_vacuum is reset. I think it should be > reset because o

Re: archive_command / pg_stat_archiver & documentation

2021-03-03 Thread Michael Paquier
On Wed, Mar 03, 2021 at 09:13:09PM +0800, Julien Rouhaud wrote: > I think that we should consider this as committed. It should, so done now. -- Michael signature.asc Description: PGP signature

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-03 Thread Michael Paquier
On Thu, Mar 04, 2021 at 10:28:31AM +0900, Kyotaro Horiguchi wrote: > read_local_xlog_page() works as a part of logical decoding and has > responsibility to update ThisTimeLineID properly. As the comment in > the function, it is the proper place to update ThisTimeLineID since we > miss a timeline c

Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

2021-03-03 Thread Michael Paquier
On Wed, Mar 03, 2021 at 08:59:30PM +0100, Juan José Santamaría Flecha wrote: > This seems to me as if setting the variables in the shell is the proposed > way to do so. In the previous doc point we do the same with the buildenv.pl > file. It looks inconsistent, as if it was one way or the other, wh

Re: PATCH: Batch/pipelining support for libpq

2021-03-03 Thread 'Alvaro Herrera'
On 2021-Mar-03, 'Alvaro Herrera' wrote: > On 2021-Mar-03, 'Alvaro Herrera' wrote: > > > This should obviously not occur. I'm trying to figure out how to repair > > it and not break everything again ... > > I think trying to set up the connection state so that the next query > appears in conn->l

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

2021-03-03 Thread Greg Nancarrow
On Thu, Mar 4, 2021 at 1:07 AM Dilip Kumar wrote: > > On Wed, Mar 3, 2021 at 5:50 PM Greg Nancarrow wrote: > > > > Asserts are normally only enabled in a debug-build, so for a > > release-build that Assert has no effect. > > The Assert is being used as a sanity-check that the function is only > >

Re: PROXY protocol support

2021-03-03 Thread Tatsuo Ishii
> PFA a simple patch that implements support for the PROXY protocol. > > This is a protocol common and very light weight in proxies and load > balancers (haproxy is one common example, but also for example the AWS > cloud load balancers). Basically this protocol prefixes the normal > connection w

n_mod_since_analyze isn't reset at table truncation

2021-03-03 Thread Masahiko Sawada
Hi, While reviewing "autoanalyze on partitioned table" patch, I realized that pg_stat_xxx_tables.n_mod_since_analyze is not reset at TRUNCATE. On the other hand, n_ins_since_vacuum is reset. I think it should be reset because otherwise we end up unnecessarily triggering autoanalyze even when the a

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-03 Thread Kyotaro Horiguchi
At Wed, 3 Mar 2021 14:56:25 -0800, Soumyadeep Chakraborty wrote in > On 2021/03/03 17:46, Heikki Linnakangas wrote: > > > I think it should be reset even earlier, inside XlogReadTwoPhaseData() > > probably. With your patch, doesn't the LogStandbySnapshot() call just > > above where you're resse

Re: Make Append Cost aware of some run time partition prune case

2021-03-03 Thread Andy Fan
Hi Ryan: On Thu, Mar 4, 2021 at 8:14 AM Ryan Lambert wrote: > On Mon, Nov 9, 2020 at 5:44 PM Andy Fan wrote: > >> Currently the cost model of append path sums the cost/rows for all the >> subpaths, it usually works well until we run into the run-time partition >> prune >> case. The first resul

Re: PATCH: Batch/pipelining support for libpq

2021-03-03 Thread Justin Pryzby
I'm proposing some minor changes. -- Justin >From 35ed4dc1fc770834972396f7eeed142f6dabee88 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 3 Mar 2021 16:36:40 -0600 Subject: [PATCH 2/2] doc review --- doc/src/sgml/libpq.sgml| 67 +- src/interface

Re: PATCH: Batch/pipelining support for libpq

2021-03-03 Thread 'Alvaro Herrera'
On 2021-Mar-03, 'Alvaro Herrera' wrote: > This should obviously not occur. I'm trying to figure out how to repair > it and not break everything again ... I think trying to set up the connection state so that the next query appears in conn->last_query prior to PQgetResult being called again leads

Re: buildfarm windows checks / tap tests on windows

2021-03-03 Thread Andrew Dunstan
On 3/3/21 5:32 PM, Andrew Dunstan wrote: > On 3/3/21 4:42 PM, Andres Freund wrote: >> Hi, >> >> On 2021-03-03 16:07:13 -0500, Andrew Dunstan wrote: >>> Here's what I actually got working. Rip out the calls to kill_kill and >>> replace them with: >>> >>> >>> $psql_primary{stdin} .= "\\q\n"; >>

Re: Make Append Cost aware of some run time partition prune case

2021-03-03 Thread Ryan Lambert
On Mon, Nov 9, 2020 at 5:44 PM Andy Fan wrote: > Currently the cost model of append path sums the cost/rows for all the > subpaths, it usually works well until we run into the run-time partition > prune > case. The first result is that generic plans will rarely be used for some > cases. > For in

[PATCH] test/ssl: rework the sslfiles Makefile target

2021-03-03 Thread Jacob Champion
Hello all, Andrew pointed out elsewhere [1] that it's pretty difficult to add new certificates to the test/ssl suite without blowing away the current state and starting over. I needed new cases for the NSS backend work, and ran into the same pain, so here is my attempt to improve the situation. F

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-03 Thread Ryan Lambert
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:not tested The original patch still applies and passes make installcheck-world. An

Re: Removing support for COPY FROM STDIN in protocol version 2

2021-03-03 Thread Tom Lane
I wrote: > I concur that 0001 attached is committable. I have not looked at > your 0002, though. Oh ... grepping discovered one more loose end: mention of fe-protocol2.c has to be removed from src/interfaces/libpq/nls.mk. regards, tom lane

Re: PATCH: Batch/pipelining support for libpq

2021-03-03 Thread 'Alvaro Herrera'
On 2021-Mar-03, 'Alvaro Herrera' wrote: > I'm much more comfortable with this version, so I'm marking the patch as > Ready for Committer in case anybody else wants to look at this before I > push it. Actually, I just noticed a pretty serious problem, which is that when we report an error, we don'

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-03 Thread Soumyadeep Chakraborty
On 2021/03/03 17:46, Heikki Linnakangas wrote: > I think it should be reset even earlier, inside XlogReadTwoPhaseData() > probably. With your patch, doesn't the LogStandbySnapshot() call just > above where you're ressetting ThisTimeLineID also write a WAL record > with incorrect timeline? Agreed.

Re: Fix DROP TABLESPACE on Windows with ProcSignalBarrier?

2021-03-03 Thread Thomas Munro
On Tue, Mar 2, 2021 at 5:28 PM Thomas Munro wrote: > On Tue, Feb 2, 2021 at 11:16 AM Thomas Munro wrote: > > Right, the checkpoint itself is probably worse than this > > "close-all-your-files!" thing in some cases [...] > > I've been wondering what obscure hazards these "tombstone" (for want > of

Re: buildfarm windows checks / tap tests on windows

2021-03-03 Thread Andrew Dunstan
On 3/3/21 4:42 PM, Andres Freund wrote: > Hi, > > On 2021-03-03 16:07:13 -0500, Andrew Dunstan wrote: >> Here's what I actually got working. Rip out the calls to kill_kill and >> replace them with: >> >> >> $psql_primary{stdin} .= "\\q\n"; >> $psql_primary{run}->pump_nb(); >> $psql_st

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2021-03-03 Thread Mark Rofail
Hello Justin, It doesn't just rebase: it also removes the test which was failing on > windows > CI: > My apologies, I didn’t include it in the changelog since this is not a code change, just wanted to see if any other test would fail on the windows CI I think the SELECT, when it works, is actuall

Re: Fix DROP TABLESPACE on Windows with ProcSignalBarrier?

2021-03-03 Thread Andres Freund
Hi, On 2021-03-02 00:54:49 +1300, Thomas Munro wrote: > Subject: [PATCH v6] Use a global barrier to fix DROP TABLESPACE on Windows. After finally getting the windows CI tests to work on AIO I noticed that the windows tests show the following: https://cirrus-ci.com/task/4536820663844864 ... =

Re: Fix DROP TABLESPACE on Windows with ProcSignalBarrier?

2021-03-03 Thread Thomas Munro
On Thu, Mar 4, 2021 at 4:18 AM Daniel Gustafsson wrote: > > On 1 Mar 2021, at 12:54, Thomas Munro wrote: > Based on my (limited) experience with procsignalbarriers I think this patch is Help wanted: must have at least 14 years experience with ProcSignalBarrier! Yeah, I'm still figuring out the

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2021-03-03 Thread Justin Pryzby
On Wed, Mar 03, 2021 at 11:31:49PM +0200, Mark Rofail wrote: > This is just a rebase patch since the patch is no longer applicable to the > current master. It doesn't just rebase: it also removes the test which was failing on windows CI: --- Try using the indexable operator -SELECT * FROM FKTABLE

Re: TRIM_ARRAY

2021-03-03 Thread Vik Fearing
On 3/3/21 10:47 PM, Tom Lane wrote: > > I had the same problem as Dian of the func.sgml hunk winding up in > the wrong place. I think this is practically inevitable unless the > submitter uses more than 3 lines of context for the diff, because > otherwise the context is just boilerplate that look

Re: TRIM_ARRAY

2021-03-03 Thread Tom Lane
Vik Fearing writes: > On 3/2/21 1:02 AM, Dian M Fay wrote: >> I'd thought that checking v and returning null instead of raising the >> error would be more friendly, should it be possible to pass an untyped >> null accidentally instead of on purpose, and I couldn't rule that out. > As Tom said, th

Re: buildfarm windows checks / tap tests on windows

2021-03-03 Thread Andres Freund
Hi, On 2021-03-03 16:07:13 -0500, Andrew Dunstan wrote: > Here's what I actually got working. Rip out the calls to kill_kill and > replace them with: > > > $psql_primary{stdin} .= "\\q\n"; > $psql_primary{run}->pump_nb(); > $psql_standby{stdin} .= "\\q\n"; > $psql_standby{run}->p

Re: [HACKERS] Custom compression methods

2021-03-03 Thread Robert Haas
Hi, Does this patch need to do something about ExtractReplicaIdentity()? If there are compressed fields in the tuple being built, can we rely on the decompression engine being available at the time we need to do something with the tuple? More generally, I think it would be good to divide up 0001

Re: Table AM and DDLs

2021-03-03 Thread Mats Kindahl
On Tue, Feb 23, 2021 at 2:11 AM Andres Freund wrote: > Hi, > Hi Andres, Thanks for the answer and sorry about the late reply. > On 2021-02-22 08:33:21 +0100, Mats Kindahl wrote: > > I started to experiment with the table access method interface to see if > it > > can be used for some ideas I

Re: buildfarm windows checks / tap tests on windows

2021-03-03 Thread Andrew Dunstan
On 3/3/21 7:57 AM, Andrew Dunstan wrote: > On 3/3/21 12:47 AM, Andres Freund wrote: >> Hi, >> >> On 2021-03-02 21:20:52 -0500, Andrew Dunstan wrote: >>> On 3/2/21 8:27 PM, Michael Paquier wrote: On Tue, Mar 02, 2021 at 04:54:57PM -0800, Andres Freund wrote: > It still does, even after >>

Re: Extensibility of the PostgreSQL wire protocol

2021-03-03 Thread Hannu Krosing
I have not looked at the actual patch, but does it allow you to set up its own channels to listen to ? For example if I'd want to set up a server to listen to incoming connections over QUIC [1] - a protocol which create a connection over UDP and allows clients to move to new IP addresses (among ot

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

2021-03-03 Thread Justin Pryzby
Find attached some language fixes. |/* Do this to ensure we've pumped libpq back to idle state */ I don't know why you mean by "pumped"? The CopySendEndOfRow "case COPY_CALLBACK:" should have a "break;" This touches some of the same parts as my "bulk insert" patch: https://commitfest.postgresql

Re: simplifying foreign key/RI checks

2021-03-03 Thread Tom Lane
I took a quick look at this. I guess I'm disturbed by the idea that we'd totally replace the implementation technology for only one variant of foreign key checks. That means that there'll be a lot of minor details that don't act the same depending on context. One point I was just reminded of by

Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

2021-03-03 Thread Juan José Santamaría Flecha
On Wed, Mar 3, 2021 at 11:25 AM Julien Rouhaud wrote: > On Wed, Mar 03, 2021 at 05:19:22PM +0900, Michael Paquier wrote: > > > > Each time I do development on Windows, I get annoyed by the fact that > > it is not easy to run individual test scripts in the same way as we do > > on any other platfo

Re: Extensibility of the PostgreSQL wire protocol

2021-03-03 Thread Peter Eisentraut
I think, the way the abstractions are chosen in this patch, it is still very much tied to how the libpq protocol works. For example, there is a cancel key and a ready-for-query message. Some of the details of the simple and the extended query are exposed. So you could create a protocol th

Re: Catalog version access

2021-03-03 Thread Tom Lane
Vik Fearing writes: > On 3/3/21 6:35 PM, Peter Eisentraut wrote: >> If what you want to know is whether a given binary can run against a >> given data directory then CATALOG_VERSION_NO isn't the only thing you >> need to check.  The full truth of this is in ReadControlFile().  The >> best way to g

Re: Libpq support to connect to standby server as priority

2021-03-03 Thread Tom Lane
I wrote: > vignesh C writes: >> Conchuela is failing because of: >> ok 17 - connect to node standby_1 if mode "standby" and standby_1,primary >> listed >> ack Broken pipe: write( 13, 'SHOW port;' ) at >> /usr/local/lib/perl5/site_perl/IPC/Run/IO.pm line 549. > It didn't fail on the next run, so t

Re: proposal - psql - use pager for \watch command

2021-03-03 Thread Pavel Stehule
Hi út 16. 2. 2021 v 2:49 odesílatel Thomas Munro napsal: > On Fri, Jan 8, 2021 at 10:36 PM Pavel Stehule > wrote: > > ne 19. 4. 2020 v 19:27 odesílatel Pavel Stehule > napsal: > >> last week I finished pspg 3.0 https://github.com/okbob/pspg . pspg now > supports pipes, named pipes very well. T

Re: Table AM modifications to accept column projection lists

2021-03-03 Thread Jacob Champion
On Tue, 2021-03-02 at 10:35 -0800, Zhihong Yu wrote: > Hi, Thanks for the review! > + /* Make sure the the new slot is not dependent on the original tuple */ > > There is duplicate 'the'. Thanks, I'll add this for the next batch of updates. > For neededColumnContextWalker(), > > + els

Re: Speeding up GIST index creation for tsvectors

2021-03-03 Thread John Naylor
On Wed, Jan 27, 2021 at 11:07 AM Amit Khandekar wrote: Hi Amit, Your performance numbers look like this is a fruitful area to improve. I have not yet tested performance, but I will do so at a later date. I did some microbenchmarking of our popcount implementation, since I wasn't quite sure it's

Re: Catalog version access

2021-03-03 Thread Vik Fearing
On 3/3/21 6:35 PM, Peter Eisentraut wrote: > On 22.02.21 08:00, Vik Fearing wrote: >> On 2/22/21 3:24 AM, Andres Freund wrote: >>> Imagine trying to run regular tests of HEAD, where the tests require a >>> large database to be loaded. Re-loading the data for every [few] commits >>> is prohibitively

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

2021-03-03 Thread Pavel Stehule
st 3. 3. 2021 v 17:58 odesílatel David Steele napsal: > On 7/3/20 11:27 PM, Pavel Stehule wrote: > > > > pá 3. 7. 2020 v 12:16 odesílatel Artur Zakirov > > napsal: > > > > The patch looks interesting. As far as I understand the purpose of > the > > patch is to h

Re: Catalog version access

2021-03-03 Thread Peter Eisentraut
On 22.02.21 08:00, Vik Fearing wrote: On 2/22/21 3:24 AM, Andres Freund wrote: Imagine trying to run regular tests of HEAD, where the tests require a large database to be loaded. Re-loading the data for every [few] commits is prohibitively time consuming, and even just running pg_upgrade is pain

Re: proposal: type info support functions for functions that use "any" type

2021-03-03 Thread Pavel Stehule
st 3. 3. 2021 v 18:12 odesílatel David Steele napsal: > > pá 31. 7. 2020 v 2:32 odesílatel Tom Lane > > napsal: > > > > So my opinion is still what it was in January. > > Since there does not appear to be support for this patch and it has not > attracted any new re

Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall

2021-03-03 Thread Peter Eisentraut
On 01.03.21 11:12, Michael Banck wrote: postgres@kohn:~$ pg_dump --create-only -p 65432 -d test -h /tmp | egrep -v '^($|--|SET)' SELECT pg_catalog.set_config('search_path', '', false); CREATE DATABASE test WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'de_DE.UTF-8'; ALTER DATABASE test O

Re: Pg14, pg_dumpall and "password_encryption=true"

2021-03-03 Thread Peter Eisentraut
On 18.01.21 07:18, Michael Paquier wrote: This would be interpreting setconfig='{password_encryption=on}' as "opt out of future password security increases". I expect that will tend not to match the intent of the person entering the setting. That said, if v14 were already behaving this way, I w

Re: pg_amcheck contrib application

2021-03-03 Thread Robert Haas
On Wed, Mar 3, 2021 at 10:22 AM Mark Dilger wrote: > > Your four messages about there being nothing to check seem like they > > could be consolidated down to one: "nothing to check for pattern > > \"%s\"". > > I anticipated your review comment, but I'm worried about the case that > somebody runs

Re: proposal: type info support functions for functions that use "any" type

2021-03-03 Thread David Steele
pá 31. 7. 2020 v 2:32 odesílatel Tom Lane > napsal: So my opinion is still what it was in January. Since there does not appear to be support for this patch and it has not attracted any new review or comment in the last year I'm planning to close it on MAR 8 unle

Re: Confusing behavior of psql's \e

2021-03-03 Thread Jacob Champion
On Wed, 2021-03-03 at 17:08 +0100, Laurenz Albe wrote: > This is no new behavior, and I think this is rare enough that we don't > have to bother. I agree that it's not new behavior, but this patch exposes that behavior for the temporary file case, because you've fixed the bug that caused the times

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

2021-03-03 Thread David Steele
On 7/3/20 11:27 PM, Pavel Stehule wrote: pá 3. 7. 2020 v 12:16 odesílatel Artur Zakirov > napsal: The patch looks interesting. As far as I understand the purpose of the patch is to hide status messages from result output. So maybe it would be enough just t

Re: WIP: Aggregation push-down

2021-03-03 Thread David Steele
On 7/3/20 6:07 AM, Laurenz Albe wrote: On Thu, 2020-07-02 at 14:39 +0200, Daniel Gustafsson wrote: This version now fails to apply to HEAD, with what looks like like a trivial error in the expected test output. Can you please submit a rebased version so we can see it run in the patch tester CI?

our use of popcount

2021-03-03 Thread John Naylor
While reviewing the patch to speed up Gist indexes with tsvectors [1] by smarter use of popcount, I was reminded that for hardware popcount, we do an indirect function call to execute a single CPU instruction, one word at a time. I went ahead and did some microbenchmarks to see how much that buys u

Re: Shared memory size computation oversight?

2021-03-03 Thread Julien Rouhaud
On Wed, Mar 03, 2021 at 11:23:54AM -0500, Tom Lane wrote: > Georgios writes: > > My limited understanding is also based in a comment in > > CreateSharedMemoryAndSemaphores() > > > * Size of the Postgres shared-memory block is estimated via > > * moderately-accurate estimates fo

Re: Shared memory size computation oversight?

2021-03-03 Thread Julien Rouhaud
On Wed, Mar 03, 2021 at 03:37:20PM +, Georgios wrote: > > Please excuse me as I speak most from the side of ignorance. I am slightly > curious > to understand something in your patch, if you can be kind enough to explain > it to > me. > > The commit 09adc9a8c09 you pointed out to, as far as

Re: PATCH: Batch/pipelining support for libpq

2021-03-03 Thread 'Alvaro Herrera'
On 2021-Mar-03, k.jami...@fujitsu.com wrote: > I tried applying this patch to test it on top of Iwata-san's libpq trace log > [1]. > In my environment, the compiler complains. > It seems that in libpqwalreceiver.c: libpqrcv_exec() > the switch for PQresultStatus needs to handle the > cases for PG

Re: [PATCH] Implement INSERT SET syntax

2021-03-03 Thread David Steele
On 4/23/20 8:04 PM, Gareth Palmer wrote: Thank you for the review, attached is v7 of the patch which should apply correcly to HEAD. This version now uses it's own production rule for the SET clause to avoid the issue with MultiAssigmentRef nodes in the targetList. Ibrar, Movead, you are the r

Re: Shared memory size computation oversight?

2021-03-03 Thread Tom Lane
Georgios writes: > My limited understanding is also based in a comment in > CreateSharedMemoryAndSemaphores() > * Size of the Postgres shared-memory block is estimated via > * moderately-accurate estimates for the big hogs, plus 100K for the > * stuff that's too small

Re: A reloption for partitioned tables - parallel_workers

2021-03-03 Thread Laurenz Albe
On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > On Tue, Mar 2, 2021 at 5:47 PM Laurenz Albe wrote: > > On Tue, 2021-03-02 at 11:23 +0900, Amit Langote wrote: > > > I got the same result with my implementation, but I am wondering if > > > setting parallel_workers=0 on the parent table shou

Re: Make mesage at end-of-recovery less scary.

2021-03-03 Thread David Steele
Hi Kyotaro, On 3/27/20 10:25 PM, James Coleman wrote: On Thu, Mar 26, 2020 at 12:41 PM Robert Haas wrote: I'm just spitballing here, but it would be really good if there's a way to know definitely whether or not you should be scared. Corrupted WAL segments are definitely a thing that happens,

Re: Confusing behavior of psql's \e

2021-03-03 Thread Laurenz Albe
Thanks for testing! On Wed, 2021-03-03 at 00:07 +, Jacob Champion wrote: > On Wed, 2020-12-16 at 10:45 +0100, Laurenz Albe wrote: > > > I consider this a bug fix, but one that shouldn't be backpatched. > > Re-executing the previous query if the editor is quit is > > annoying at least and dang

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread Tom Lane
I wrote: > You can add the I/O functions with ALTER TYPE nowadays. To be concrete, see 949a9f043eb70a4986041b47513579f9a13d6a33 regards, tom lane

Re: Shared memory size computation oversight?

2021-03-03 Thread Georgios
Hi, ‐‐‐ Original Message ‐‐‐ On Saturday, February 27, 2021 9:08 AM, Julien Rouhaud wrote: > Hi, > > While investigating on some strange "out of shared memory" error reported on > the french BBS [1], I noticed that 09adc9a8c09 (adding Robert in Cc) changed > ShmemAlloc alignment to

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

2021-03-03 Thread Robert Treat
On Wed, Mar 3, 2021 at 7:10 AM Hannu Krosing wrote: > On Wed, Mar 3, 2021 at 11:33 AM David Rowley wrote: > > On Wed, 3 Mar 2021 at 21:44, Magnus Hagander wrote: > > > > I meant to ignore the cost limits if we're within a hundred million or > > so of the stopLimit. Per what Hannu mentioned, the

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread Tom Lane
Kohei KaiGai writes: > One thing not straightforward is that a new definition of cube type > needs to drop > the old definition once, then it leads cascaded deletion to the > objects that depends > on the "cube" type declared at the cube--1.2.sql. > Do you have any good ideas? You can add the I/O

Re: [Patch] ALTER SYSTEM READ ONLY

2021-03-03 Thread Robert Haas
On Tue, Mar 2, 2021 at 7:22 AM Dilip Kumar wrote: > Why do we need to move promote related code in XLogAcceptWrites? > IMHO, this promote related handling should be in StartupXLOG only. > That will look cleaner. The key design question here, at least in my mind, is what exactly happens after proh

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread Kohei KaiGai
2021年3月3日(水) 23:33 Peter Eisentraut : > > On 24.02.21 04:18, Kohei KaiGai wrote: > > This patch adds cube_send / cube_recv handlers on the contrib/cube data > > type. > > Once this patch was applied to, the libpq client can obtain the table > > data using binary mode. > > Seems reasonable. But yo

Re: buildfarm windows checks / tap tests on windows

2021-03-03 Thread Andrew Dunstan
On 3/2/21 3:57 PM, Andres Freund wrote: > >>> This makes it even clearer to me that we really need a builtin >>> testrunner that runs tests efficiently *and* debuggable on windows. >>> >> "show me the code" :-) > The biggest obstacle on that front is perl. I started to write one, but > hit severa

  1   2   >