Re: [PATCH] psql : Improve code for help option

2021-03-03 Thread Nitin Jadhav
Hi, I have reviewed the patch and it looks good to me. Thanks and Regards, Nitin Jadhav On Wed, Mar 3, 2021 at 1:09 PM Fujii Masao wrote: > > > On 2021/03/03 12:27, miyake_kouta wrote: > > 2021-03-03 00:09, Fujii Masao wrote: > >> We can simplify the code more and remove "env = user" > >> by j

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2021-03-03 Thread Pavel Borisov
> > You're going to have to "couple" buffer locks in the style of > _bt_check_unique() (as well as keeping a buffer lock on "the first > leaf page a duplicate might be on" throughout) if you need the test to > work reliably. But why bother with that? The tool doesn't have to be > 100% perfect at de

Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

2021-03-03 Thread Michael Paquier
Hi all, 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 platforms, using PROVE_TESTS, or even PROVE_FLAGS. And there have been recent complaints about not being able to do that. Please find

Increase value of OUTER_VAR

2021-03-03 Thread Andrey Lepikhov
Hi, Playing with a large value of partitions I caught the limit with 65000 table entries in a query plan: if (IS_SPECIAL_VARNO(list_length(glob->finalrtable))) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg("too many range table entries"

Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails

2021-03-03 Thread Neil Chen
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed Greetings, I learned about the patch and read your discussions.

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

2021-03-03 Thread Magnus Hagander
On Tue, Mar 2, 2021 at 10:07 PM David Rowley wrote: > > On Wed, 3 Mar 2021 at 01:12, Magnus Hagander wrote: > > > > On Tue, Mar 2, 2021 at 7:52 AM David Rowley wrote: > > > I have seen it happen that an instance has a vacuum_cost_limit set and > > > someone did start the database in single-user

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-03 Thread Heikki Linnakangas
On 03/03/2021 08:47, Kyotaro Horiguchi wrote: At Tue, 2 Mar 2021 17:56:03 -0800, Soumyadeep Chakraborty wrote in When there are prepared transactions in an older timeline, in the checkpointer, a call to CheckPointTwoPhase() and subsequently to XlogReadTwoPhaseData() and subsequently to read_lo

Re: Increase value of OUTER_VAR

2021-03-03 Thread David Rowley
On Wed, 3 Mar 2021 at 21:29, Andrey Lepikhov wrote: > > Playing with a large value of partitions I caught the limit with 65000 > table entries in a query plan: > > if (IS_SPECIAL_VARNO(list_length(glob->finalrtable))) > ereport(ERROR, > (errcode(ERRCODE_PROGRAM_LIMIT_EXCEED

Re: Increase value of OUTER_VAR

2021-03-03 Thread Amit Langote
On Wed, Mar 3, 2021 at 5:52 PM David Rowley wrote: > On Wed, 3 Mar 2021 at 21:29, Andrey Lepikhov > wrote: > > > > Playing with a large value of partitions I caught the limit with 65000 > > table entries in a query plan: > > > > if (IS_SPECIAL_VARNO(list_length(glob->finalrtable))) > > e

Re: pg_upgrade version checking questions

2021-03-03 Thread Peter Eisentraut
On 02.03.21 22:51, Daniel Gustafsson wrote: The commit message says something about "to ensure the health of the target cluster", which doesn't make sense to me. Maybe find a better wording. Reworded in the attached updated version. The name find_exec() seems not very accurate. It doesn't

Re: A reloption for partitioned tables - parallel_workers

2021-03-03 Thread Amit Langote
On Tue, Mar 2, 2021 at 5:47 PM Laurenz Albe wrote: > On Tue, 2021-03-02 at 11:23 +0900, Amit Langote wrote: > > +ALTER TABLE pagg_tab_ml SET (parallel_workers = 0); > > +EXPLAIN (COSTS OFF) > > +SELECT a FROM pagg_tab_ml WHERE b = 42; > > +QUERY PLAN > > +--

Re: PROXY protocol support

2021-03-03 Thread Magnus Hagander
On Wed, Mar 3, 2021 at 1:50 AM Jacob Champion wrote: > > On Tue, 2021-03-02 at 18:43 +0100, Magnus Hagander wrote: > > PFA a simple patch that implements support for the PROXY protocol. > > I'm not all the way through the patch yet, but this part jumped out at > me: > > > + if (memcmp(proxyhea

Re: [PATCH] Note effect of max_replication_slots on subscriber side in documentation.

2021-03-03 Thread Amit Kapila
On Mon, Mar 1, 2021 at 5:32 PM Amit Kapila wrote: > > On Sat, Feb 27, 2021 at 2:35 PM Amit Kapila wrote: > > > > On Sat, Feb 27, 2021 at 2:47 AM Paul Martinez wrote: > > > > > > On Fri, Feb 26, 2021 at 5:22 AM Amit Kapila > > > wrote: > > > > > > > > https://www.postgresql.org/docs/devel/logic

Re: macOS SIP, next try

2021-03-03 Thread Peter Eisentraut
On 01.03.21 15:44, Tom Lane wrote: Peter Eisentraut writes: I have since learned that there is a way to disable only the part of SIP that is relevant for us. This seems like a useful compromise, and it appears that a number of other open-source projects are following the same route. I suggest

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-03 Thread Fujii Masao
On 2021/03/03 17:46, Heikki Linnakangas wrote: On 03/03/2021 08:47, Kyotaro Horiguchi wrote: At Tue, 2 Mar 2021 17:56:03 -0800, Soumyadeep Chakraborty wrote in When there are prepared transactions in an older timeline, in the checkpointer, a call to CheckPointTwoPhase() and subsequently to

Re: pg_upgrade version checking questions

2021-03-03 Thread Daniel Gustafsson
> On 3 Mar 2021, at 09:57, Peter Eisentraut > wrote: > I committed this. I added a pg_strip_crlf() so that there are no newlines in > the error message. Right, that's much better, thanks! -- Daniel Gustafsson https://vmware.com/

[PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace

2021-03-03 Thread Gilles Darold
Oracle: https://docs.oracle.com/en/database/oracle/oracle-database/18/adfns/regexp.html#GUID-F14733F3-B943-4BAD-8489-F9704986386B IBM: https://www.ibm.com/support/producthub/db2/docs/content/SSEPGG_11.5.0/com.ibm.db2.luw.sql.ref.doc/doc/r0061494.html?pos=2 Z/OS: https://www.ibm.com/support/knowledg

Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace

2021-03-03 Thread Gilles Darold
My apologies for the links in the head, the email formatting and the missing patch, I accidently send the email too early. -- Gilles diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index bf99f82149..88e08b40d2 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -3097

Re: Reduce the number of special cases to build contrib modules on windows

2021-03-03 Thread David Rowley
Thank you for having another look at this. On Tue, 12 Jan 2021 at 20:18, Michael Paquier wrote: > > On Wed, Dec 30, 2020 at 10:07:29AM +1300, David Rowley wrote: > > -#ifdef LOWER_NODE > > +/* > > + * Below we ignore the fact that LOWER_NODE is defined when compiling with > > + * MSVC. The reaso

Re: PROXY protocol support

2021-03-03 Thread Magnus Hagander
On Wed, Mar 3, 2021 at 10:00 AM Magnus Hagander wrote: > > On Wed, Mar 3, 2021 at 1:50 AM Jacob Champion wrote: > > > > On Tue, 2021-03-02 at 18:43 +0100, Magnus Hagander wrote: > > > PFA a simple patch that implements support for the PROXY protocol. > > > > I'm not all the way through the patch

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

2021-03-03 Thread Amit Kapila
On Wed, Mar 3, 2021 at 12:52 PM Greg Nancarrow wrote: > > On Tue, Mar 2, 2021 at 11:19 PM Amit Kapila wrote: > > > > On Mon, Mar 1, 2021 at 9:08 AM Greg Nancarrow wrote: > > > 2. > > /* > > + * Prepare for entering parallel mode by assigning a > > + * FullTransactionId, to be included in the tra

Re: Increase value of OUTER_VAR

2021-03-03 Thread Julien Rouhaud
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 this for quite a while. > >

Re: enable_incremental_sort changes query behavior

2021-03-03 Thread rbrooks
Thanks for clarifying, Tomas. Yes - it appears Google Cloud SQL automatically updates minor versions of Postgres but hasn't updated beyond 13.1 yet. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

2021-03-03 Thread Julien Rouhaud
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 platforms, using PROVE_TESTS, or even PROVE_FLAGS. And > there have be

Why OR-clauses not getting copied into baserestrictinfo of another table whose columns are in the same EquivalenceClass?

2021-03-03 Thread Mohamed Insaf
Hello hackers, I have a question regarding distributing the filter clause(baserestrictinfo) of one table into another table(Keys belong to the same EquivalenceClass). In the following query, why PG is not copying the filter (t1.pk=1 OR t1.pk=2) into t2's baserestrictinfo? I believe PG copies thos

Avoid CommandCounterIncrement in RI trigger when INSERT INTO referencing table

2021-03-03 Thread houzj.f...@fujitsu.com
Hi hackers, Currently, postgres increments command id in ri trigger every time when inserting into a referencing table(fk relation). RI_FKey_check-> ri_PerformCheck->SPI_execute_snapshot-> _SPI_execute_plan-> CommandCounterIncrement It can be a block for supporting "parallel insert into a refer

Re: Disallow SSL compression?

2021-03-03 Thread Daniel Gustafsson
> On 26 Feb 2021, at 20:34, Daniel Gustafsson wrote: > Attached is a v2 which retains the sslcompression parameter for backwards > compatibility. And now a v3 which fixes an oversight in postgres_fdw as well as adds an SSL TAP test to cover deprecated parameters. -- Daniel Gustafsson

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

2021-03-03 Thread David Rowley
On Wed, 3 Mar 2021 at 21:44, Magnus Hagander wrote: > > On Tue, Mar 2, 2021 at 10:07 PM David Rowley wrote: > > > > On Wed, 3 Mar 2021 at 01:12, Magnus Hagander wrote: > > > > > > On Tue, Mar 2, 2021 at 7:52 AM David Rowley wrote: > > > > I have seen it happen that an instance has a vacuum_cost

Re: Why OR-clauses not getting copied into baserestrictinfo of another table whose columns are in the same EquivalenceClass?

2021-03-03 Thread David Rowley
On Wed, 3 Mar 2021 at 23:26, Mohamed Insaf wrote: > I have a question regarding distributing the filter clause(baserestrictinfo) > of one table into another table(Keys belong to the same EquivalenceClass). > > In the following query, why PG is not copying the filter (t1.pk=1 OR t1.pk=2) > into t

Re: [Patch] ALTER SYSTEM READ ONLY

2021-03-03 Thread Amul Sul
On Wed, Mar 3, 2021 at 12:08 PM Dilip Kumar wrote: > > On Tue, Mar 2, 2021 at 9:01 PM Dilip Kumar wrote: > > > > > > > We don't want that to happen in cases where previous > > > recovery-end-checkpoint is > > > skipped in startup. We want Checkpointer first to convey the barrier to > > > all >

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

2021-03-03 Thread Masahiro Ikeda
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 Masahiro Ikeda wrote: I pgindented the patches.

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

2021-03-03 Thread Dilip Kumar
On Mon, Mar 1, 2021 at 9:08 AM Greg Nancarrow wrote: > > Posting an updated set of patches that includes Amit Langote's patch > to the partition tracking scheme... > (the alternative of adding partitions to the range table needs further > investigation) I was reviewing your latest patch and I hav

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

2021-03-03 Thread Hannu Krosing
On Wed, Mar 3, 2021 at 11:33 AM David Rowley wrote: > > On Wed, 3 Mar 2021 at 21:44, Magnus Hagander wrote: ... > > I think we misunderstand each other. I meant this only as a comment > > about the idea of ignoring the cost limit in single user mode -- that > > is, it's a reason to *want* vacuum

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

2021-03-03 Thread Greg Nancarrow
On Wed, Mar 3, 2021 at 10:45 PM Dilip Kumar wrote: > > On Mon, Mar 1, 2021 at 9:08 AM Greg Nancarrow wrote: > > > > Posting an updated set of patches that includes Amit Langote's patch > > to the partition tracking scheme... > > (the alternative of adding partitions to the range table needs furth

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

2021-03-03 Thread Amit Kapila
On Sat, Feb 27, 2021 at 8:10 PM Peter Smith wrote: > > Please find attached the latest patch set v45* > > Differences from v44*: > > * Rebased to HEAD > > * Addressed some feedback comments for the 0007 ("empty prepare") patch. > > [ak1] #1 - TODO > [ak1] #2 - Fixed. Removed #if 0 debugging > [ak1

Re: Why OR-clauses not getting copied into baserestrictinfo of another table whose columns are in the same EquivalenceClass?

2021-03-03 Thread Ashutosh Bapat
On Wed, Mar 3, 2021 at 3:56 PM Mohamed Insaf wrote: > > Hello hackers, > > I have a question regarding distributing the filter clause(baserestrictinfo) > of one table into another table(Keys belong to the same EquivalenceClass). > > In the following query, why PG is not copying the filter (t1.pk=

Re: archive_command / pg_stat_archiver & documentation

2021-03-03 Thread David Steele
On 3/1/21 8:29 PM, Michael Paquier wrote: On Mon, Mar 01, 2021 at 05:17:06PM +0800, Julien Rouhaud wrote: Maybe this can be better addressed than with a link in the documentation. The final outcome is that it can be difficult to monitor the archiver state in such case. That's orthogonal to thi

Re: [PATCH] Identify LWLocks in tracepoints

2021-03-03 Thread David Steele
On 1/22/21 6:02 AM, Peter Eisentraut wrote: On 2021-01-14 09:39, Craig Ringer wrote: On Thu, 14 Jan 2021 at 15:56, Peter Eisentraut > wrote:     On 2020-12-19 06:00, Craig Ringer wrote: > Patch 1 fixes a bogus tracepoint where an lwlock__acquire e

Re: EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW

2021-03-03 Thread David Steele
Hi Japin, On 1/8/21 9:02 PM, japin wrote: On Sat, 09 Jan 2021 at 09:38, Bharath Rupireddy wrote: On Fri, Jan 8, 2021 at 9:50 PM japin wrote: I ran pgindent on 0001 patch to fix the above. 0002 patch has no changes. If I'm correct, pgindent will be run periodically on master. Thanks for yo

Re: buildfarm windows checks / tap tests on windows

2021-03-03 Thread Andrew Dunstan
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 commit 1e6e40447115ca7b4749d7d117b81b016e

Re: archive_command / pg_stat_archiver & documentation

2021-03-03 Thread Julien Rouhaud
On Wed, Mar 03, 2021 at 07:37:02AM -0500, David Steele wrote: > On 3/1/21 8:29 PM, Michael Paquier wrote: > > On Mon, Mar 01, 2021 at 05:17:06PM +0800, Julien Rouhaud wrote: > > > Maybe this can be better addressed than with a link in the > > > documentation. The final outcome is that it can be di

Re: Huge memory consumption on partitioned table with FKs

2021-03-03 Thread David Steele
On 12/7/20 10:59 PM, Amit Langote wrote: On Tue, Dec 8, 2020 at 12:04 PM Kyotaro Horiguchi wrote: At Tue, 8 Dec 2020 01:16:00 +0900, Amit Langote wrote in On Mon, Dec 7, 2020 at 23:48 Alvaro Herrera wrote: I think this bit about splitting the struct is a distraction. Let's get a patch th

Re: 回复:Re: Cache relation sizes?

2021-03-03 Thread David Steele
Hi Thomas, On 1/18/21 10:42 PM, 陈佳昕(步真) wrote: I want to share a patch with you, I change the replacement algorithm from fifo to a simple lru. What do you think of this change? Also, your patch set from [1] no longer applies (and of course this latest patch is confusing the tester as well).

Re: authtype parameter in libpq

2021-03-03 Thread Peter Eisentraut
On 26.02.21 21:02, Daniel Gustafsson wrote: When looking at disallowing SSL compression I found the parameter "authtype" which was deprecated in commit d5bbe2aca55bc8 on January 26 1998. While I do think there is a case to be made for the backwards compatibility having run its course on this one

Re: "has_column_privilege()" issue with attnums and non-existent columns

2021-03-03 Thread David Steele
On 1/29/21 4:56 AM, Joe Conway wrote: On 1/29/21 12:13 AM, Ian Lawrence Barwick wrote: 2021年1月28日(木) 17:18 Peter Eisentraut: I'm not convinced the current behavior is wrong.  Is there some practical use case that is affected by this behavior? I was poking around at the function with

Re: OpenSSL 3.0.0 compatibility

2021-03-03 Thread Peter Eisentraut
This thread is still in the commit fest, but I don't see any actual proposed patch still pending. Most of the activity has moved into other threads. Could you update the status of this CF entry, and perhaps also on the status of OpenSSL compatibility in general?

Re: Huge memory consumption on partitioned table with FKs

2021-03-03 Thread Amit Langote
Hi David, On Wed, Mar 3, 2021 at 10:21 PM David Steele wrote: > On 12/7/20 10:59 PM, Amit Langote wrote: > > On Tue, Dec 8, 2020 at 12:04 PM Kyotaro Horiguchi > > wrote: > >> At Tue, 8 Dec 2020 01:16:00 +0900, Amit Langote > >> wrote in > >>> On Mon, Dec 7, 2020 at 23:48 Alvaro Herrera > >>>

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

2021-03-03 Thread Peter Eisentraut
On 01.01.21 14:12, Magnus Hagander wrote: That said, I agree with not adding it as an option to initdb. You'll quickly get to the point where you specify the whole pg_hba file on the commandline to initdb -- and most people today who actually care that much about it would have their pg_hba.conf

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

2021-03-03 Thread Dilip Kumar
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 > currently getting called for INSERT, because that's all it curre

Re: PROXY protocol support

2021-03-03 Thread Bruno Lavoie
+10 on this one! Hosting a farm of read replicas and r/w endpoint behind an HAproxy makes the powerful pg_hba purpose by hiding the real source address... which is bad for some environments with strict conformance and audit requirements Le mar. 2 mars 2021 à 12:43, Magnus Hagander a écrit : >

Re: Disallow SSL compression?

2021-03-03 Thread Peter Eisentraut
On 03.03.21 11:31, Daniel Gustafsson wrote: On 26 Feb 2021, at 20:34, Daniel Gustafsson wrote: Attached is a v2 which retains the sslcompression parameter for backwards compatibility. And now a v3 which fixes an oversight in postgres_fdw as well as adds an SSL TAP test to cover deprecated

Re: [Patch] ALTER SYSTEM READ ONLY

2021-03-03 Thread Dilip Kumar
On Wed, Mar 3, 2021 at 4:50 PM Amul Sul wrote: > > On Wed, Mar 3, 2021 at 12:08 PM Dilip Kumar wrote: > > > Yes, it is possible to allow wal temporarily for itself by setting > LocalXLogInsertAllowed, but when we request Checkpointer for the > end-of-recovery > checkpoint, the first thing it wil

Re: [patch] bit XOR aggregate functions

2021-03-03 Thread Peter Eisentraut
On 10.02.21 06:42, Kyotaro Horiguchi wrote: We already had CREATE AGGREATE at the time, so BIT_XOR can be thought as it falls into the same category with BIT_AND and BIT_OR, that is, we may have BIT_XOR as an intrinsic aggregation? I think the use of BIT_XOR is quite separate from BIT_AND and B

Re: contrib/cube - binary input/output handlers

2021-03-03 Thread 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 you need to write an extension upgrade script and bump the e

Re: "has_column_privilege()" issue with attnums and non-existent columns

2021-03-03 Thread Joe Conway
On 3/3/21 8:50 AM, David Steele wrote: > On 1/29/21 4:56 AM, Joe Conway wrote: >> On 1/29/21 12:13 AM, Ian Lawrence Barwick wrote: >>> 2021年1月28日(木) 17:18 Peter Eisentraut: >>> I'm not convinced the current behavior is wrong.  Is there some >>> practical use case that is affected by this

Re: jsonpath syntax extensions

2021-03-03 Thread David Steele
On 3/4/20 3:18 PM, Nikita Glukhov wrote: On 04.03.2020 19:13, David Steele wrote: On 2/27/20 10:57 AM, Nikita Glukhov wrote: Attached patches implement several useful jsonpath syntax extensions. I already published them two years ago in the original SQL/JSON thread, but then after creation of

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

2021-03-03 Thread David Steele
On 3/3/21 9:07 AM, Peter Eisentraut wrote: On 01.01.21 14:12, Magnus Hagander wrote: That said, I agree with not adding it as an option to initdb. You'll quickly get to the point where you specify the whole pg_hba file on the commandline to initdb -- and most people today who actually care tha

Re: Huge memory consumption on partitioned table with FKs

2021-03-03 Thread Alvaro Herrera
On 2021-Mar-03, Amit Langote wrote: > I don't know of any unaddressed comments on the patch, so I've marked > the entry Ready for Committer. Thanks, I'll look at it later this week. -- Álvaro Herrera39°49'30"S 73°17'W #error "Operator lives in the wrong universe" (

Re: Increase value of OUTER_VAR

2021-03-03 Thread Tom Lane
Amit Langote writes: > Also, I got reminded of this discussion from not so long ago: > https://www.postgresql.org/message-id/flat/16302-e45634e2c0e34e97%40postgresql.org Yeah. Nobody seems to have pursued Peter's idea of changing the magic values to small negative ones, but that seems like a ni

Re: Fix DROP TABLESPACE on Windows with ProcSignalBarrier?

2021-03-03 Thread Daniel Gustafsson
> On 1 Mar 2021, at 12:54, Thomas Munro wrote: Based on my (limited) experience with procsignalbarriers I think this patch is correct; the general rule-of-thumb of synchronizing backend state on barrier absorption doesn't really apply in this case, literally all we want is to know that we've hit

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

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: [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 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: 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: 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: 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: 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: 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: 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: 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: [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: 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: 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: 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

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: 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?

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: 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: 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: 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: 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: [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: 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: 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 - 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 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: 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: 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: 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: 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: 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: 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: 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: 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: [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: 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: 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: 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: [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

  1   2   >