Re: MDAM techniques and Index Skip Scan patch

2022-01-13 Thread Dmitry Dolgov
> On Thu, Jan 13, 2022 at 03:27:08PM +, Floris Van Nee wrote: > > > > Could you send a rebased version? In the meantime I will change the status > > on the cf app to Waiting on Author. > > Attached a rebased version. FYI, I've attached this thread to the CF item as an informational one, but

Re: Add sub-transaction overflow status in pg_stat_activity

2022-01-13 Thread Julien Rouhaud
On Thu, Jan 13, 2022 at 10:27:31PM +, Bossart, Nathan wrote: > Thanks for the new patch! > > + > +Returns a record of information about the backend's subtransactions. > +The fields returned are subxact_count > identifies > +number of active subtransaction and

Re: Why is src/test/modules/committs/t/002_standby.pl flaky?

2022-01-13 Thread Thomas Munro
On Thu, Jan 13, 2022 at 7:36 PM Thomas Munro wrote: > ... First I tried to use recv(fd, , 1, > MSG_PEEK) == 0 to detect EOF, which seemed to me to be a reasonable > enough candidate, but somehow it corrupts the stream (!?), Ahh, that'd be because recv() and friends are redirected to our wrappers

Re: RFC: Logging plan of the running query

2022-01-13 Thread Julien Rouhaud
Hi, On Fri, Jan 07, 2022 at 09:54:31PM +0900, Fujii Masao wrote: > > On 2022/01/07 20:58, torikoshia wrote: > > On 2022-01-07 14:30, torikoshia wrote: > > > > > Updated the patch for fixing compiler warning about the format on windows. > > > > I got another compiler warning, updated the patch

Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX

2022-01-13 Thread Julien Rouhaud
Hi, On Mon, Dec 20, 2021 at 06:45:33AM +, houzj.f...@fujitsu.com wrote: > > I tried to write a patch to fix this by invalidating the relcache after > marking > primary key in index_constraint_create(). The cfbot reports that you have a typo in your regression tests:

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

2022-01-13 Thread Thomas Munro
On Fri, Jan 14, 2022 at 4:35 PM Andres Freund wrote: > The more I think about it, the less I see why we *ever* need to re-arm the > latch in pq_check_connection() in this approach. pq_check_connection() is only > used from from ProcessInterrupts(), and there's plenty things inside >

Re: fix crash with Python 3.11

2022-01-13 Thread kato-...@fujitsu.com
Hello, I run vcregeress plcheck on Windows Server 2016 with python 3.11.0a3 and python 3.9.7 which are installed using installer. All tests are passed. I'm not familiar with PL/Python but I think it's good. regards, sho kato

Re: row filtering for logical replication

2022-01-13 Thread Peter Smith
Here are my review comments for v64-0001 (review of updates since v63-0001) ~~~ 1. doc/src/sgml/ref/create_publication.sgml - typo? + The WHERE clause allows simple expressions that don't have + user-defined functions, operators, non-immutable built-in functions. + + I think there is a

Re: null iv parameter passed to combo_init()

2022-01-13 Thread Zhihong Yu
On Thu, Jan 13, 2022 at 9:09 PM Zhihong Yu wrote: > > > On Thu, Jan 13, 2022 at 8:09 PM Noah Misch wrote: > >> On Sun, Jan 09, 2022 at 06:45:09PM -0800, Zhihong Yu wrote: >> > On Sun, Jan 9, 2022 at 1:27 PM Zhihong Yu wrote: >> > > After installing gcc-11, ./configure passed (with >>

Re: null iv parameter passed to combo_init()

2022-01-13 Thread Zhihong Yu
On Thu, Jan 13, 2022 at 8:09 PM Noah Misch wrote: > On Sun, Jan 09, 2022 at 06:45:09PM -0800, Zhihong Yu wrote: > > On Sun, Jan 9, 2022 at 1:27 PM Zhihong Yu wrote: > > > After installing gcc-11, ./configure passed (with > 0003-memcpy-null.patch). > > > In the output of `make check-world`, I

Re: Consistently use the function name CreateCheckPoint instead of CreateCheckpoint in code comments

2022-01-13 Thread Robert Treat
On Thu, Jan 13, 2022 at 10:25 PM Bharath Rupireddy wrote: > > Hi, > > The function CreateCheckPoint is specified as CreateCheckpoint in some > of the code comments whereas in other places it is correctly > mentioned. Attaching a tiny patch to use CreateCheckPoint consistently > across code

Re: null iv parameter passed to combo_init()

2022-01-13 Thread Noah Misch
On Sun, Jan 09, 2022 at 06:45:09PM -0800, Zhihong Yu wrote: > On Sun, Jan 9, 2022 at 1:27 PM Zhihong Yu wrote: > > After installing gcc-11, ./configure passed (with 0003-memcpy-null.patch). > > In the output of `make check-world`, I don't see `runtime error`. That's expected. With

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

2022-01-13 Thread Andres Freund
Hi, On 2022-01-11 22:59:13 +1300, Thomas Munro wrote: > I considered another idea we discussed: if we see a latch event, clear > it and try again so that other events can be revealed (rince and > repeat), but remember if that happens and set the latch at the end. I > think that still requires

Consistently use the function name CreateCheckPoint instead of CreateCheckpoint in code comments

2022-01-13 Thread Bharath Rupireddy
Hi, The function CreateCheckPoint is specified as CreateCheckpoint in some of the code comments whereas in other places it is correctly mentioned. Attaching a tiny patch to use CreateCheckPoint consistently across code comments. Regards, Bharath Rupireddy.

Re: small development tip: Consider using the gold linker

2022-01-13 Thread Peter Geoghegan
On Fri, Jul 20, 2018 at 8:16 PM Peter Geoghegan wrote: > On Mon, Jul 9, 2018 at 4:40 PM, Andres Freund wrote: > > FWIW, I've lately noticed that I spend a fair time waiting for the > > linker during edit-compile-test cycles. Due to an independent issue I > > just used the gold linker, and the

Re: Refactoring of compression options in pg_basebackup

2022-01-13 Thread Michael Paquier
On Thu, Jan 13, 2022 at 01:36:00PM -0500, Robert Haas wrote: > 1. If, as you propose, we add a new flag --compression-method=METHOD > then how will the user specify server-side compression? This would require a completely different option switch, which is basically the same thing as what you are

Re: [PATCH] Disable bgworkers during servers start in pg_upgrade

2022-01-13 Thread Julien Rouhaud
Hi, On Thu, Jan 13, 2022 at 06:44:12PM -0800, Andres Freund wrote: > > The point is that we need the check for WAL writes / xid assignments / etc > *either* way. There are ways extensions could trigger problems like e.g. xid > assigned, besides bgworker doing stuff. Or postgres components doing

Re: [PATCH] Disable bgworkers during servers start in pg_upgrade

2022-01-13 Thread Andres Freund
Hi, On 2022-01-12 17:54:31 +0800, Julien Rouhaud wrote: > On Sat, Aug 28, 2021 at 10:40:42AM +0900, Michael Paquier wrote: > > On Fri, Aug 27, 2021 at 12:28:42PM -0700, Andres Freund wrote: > > > Isn't that just going to end up with extension code erroring out and/or > > > blocking waiting for a

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Julien Rouhaud
Hi, On Thu, Jan 13, 2022 at 07:32:26PM +0100, Pavel Stehule wrote: > čt 13. 1. 2022 v 19:23 odesílatel Dean Rasheed > napsal: > > > On Thu, 13 Jan 2022 at 17:42, Pavel Stehule > > wrote: > > > > > > I like the idea of prioritizing tables over variables with warnings when > > collision is

Re: In-placre persistance change of a relation

2022-01-13 Thread Kyotaro Horiguchi
I found a bug. mdmarkexists() didn't close the tentatively opend fd. This is a silent leak on Linux and similars and it causes delete failure on Windows. It was the reason of the CI failure. 027_persistence_change.pl uses interactive_psql() that doesn't work on the Windos VM on the CI. In this

Re: Skipping logical replication transactions on subscriber side

2022-01-13 Thread Masahiko Sawada
On Thu, Jan 13, 2022 at 10:07 AM tanghy.f...@fujitsu.com wrote: > > On Wed, Jan 12, 2022 2:02 PM Masahiko Sawada wrote: > > > > I've attached an updated patch that incorporated all comments I got so far. > > > > Thanks for updating the patch. Here are some comments: Thank you for the comments!

Re: Skipping logical replication transactions on subscriber side

2022-01-13 Thread Masahiko Sawada
On Wed, Jan 12, 2022 at 11:10 PM vignesh C wrote: > > On Wed, Jan 12, 2022 at 11:32 AM Masahiko Sawada > wrote: > > > > On Wed, Jan 12, 2022 at 12:21 PM Amit Kapila > > wrote: > > > > > > On Wed, Jan 12, 2022 at 5:49 AM Masahiko Sawada > > > wrote: > > > > > > > > On Tue, Jan 11, 2022 at

Re: row filtering for logical replication

2022-01-13 Thread Amit Kapila
On Fri, Jan 14, 2022 at 5:48 AM Peter Smith wrote: > > On Thu, Jan 13, 2022 at 5:49 PM Peter Smith wrote: > > > > 4. src/backend/replication/pgoutput/pgoutput.c - pgoutput_row_filter > > comments > > > > + > > +/* > > + * Change is checked against the row filter, if any. > > + * > > + * If it

minor bug in sort_inner_and_outer()

2022-01-13 Thread Tomas Vondra
Hi, While looking at sort_inner_and_outer() I was rather confused what is stored in all_pathkeys, because the code does this: List *all_pathkeys; ... all_pathkeys = select_outer_pathkeys_for_merge(root, extra->mergeclause_list,

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-01-13 Thread Tomas Vondra
On 1/13/22 21:12, Arne Roland wrote: >  Hi! > >> From: Tomas Vondra >> Subject: Re: PATCH: generate fractional cheapest paths in > generate_orderedappend_path >>   >> test-# SELECT * FROM fract_t x LEFT JOIN fract_t y USING (id1, id2) >> ORDER BY id1 ASC, id2 ASC LIMIT 10; >> 

Re: row filtering for logical replication

2022-01-13 Thread Peter Smith
On Thu, Jan 13, 2022 at 5:49 PM Peter Smith wrote: > > Thanks for posting the merged v63. > > Here are my review comments for the v63-0001 changes. > ... > ~~~ > > 4. src/backend/replication/pgoutput/pgoutput.c - pgoutput_row_filter comments > > + > +/* > + * Change is checked against the row

Re: support for MERGE

2022-01-13 Thread Zhihong Yu
On Thu, Jan 13, 2022 at 4:43 AM Alvaro Herrera wrote: > Apologies, there was a merge failure and I failed to notice. Here's the > correct patch. > > (This is also in github.com/alvherre/postgres/tree/merge-15) > > Hi, For v6-0001-MERGE-SQL-Command-following-SQL-2016.patch : +* Either we

Re: libpq compression (part 2)

2022-01-13 Thread Justin Pryzby
On Fri, Jan 14, 2022 at 02:12:17AM +0500, Daniil Zakhlystov wrote: > Hi, Justin! > > First of all, thanks for the detailed review. I’ve applied your patches to > the current version. Note that my message had other comments that weren't addressed in this patch. Your 0003 patch has a couple

Re: Consider parallel for lateral subqueries with limit

2022-01-13 Thread James Coleman
On Tue, Jan 4, 2022 at 9:59 PM James Coleman wrote: > > On Tue, Jan 4, 2022 at 5:31 PM Tom Lane wrote: > > > > Greg Nancarrow writes: > > > The patch LGTM. > > > I have set the status to "Ready for Committer". > > > > I don't really see why this patch is even a little bit safe. > > The argument

Re: null iv parameter passed to combo_init()

2022-01-13 Thread Zhihong Yu
On Wed, Jan 12, 2022 at 7:08 PM Zhihong Yu wrote: > > > On Wed, Jan 12, 2022 at 6:49 PM Noah Misch wrote: > >> On Mon, Jan 10, 2022 at 03:34:27PM -0800, Zhihong Yu wrote: >> > On Sun, Jan 9, 2022 at 6:45 PM Zhihong Yu wrote: >> > > gcc -Wall -Wmissing-prototypes -Wpointer-arith >> > >

Re: Add spin_delay() implementation for Arm in s_lock.h

2022-01-13 Thread Blake, Geoff
As promised, here is the remaining data: 1 worker, w/o patch: 5236 ms +/- 252ms 1 worker, w/ patch: 5529 ms +/- 168ms 2 worker, w/o patch: 4917 ms +/- 180ms 2 worker, w/ patch: 4745 ms +/- 169ms 4 worker, w/o patch: 6564 ms +/- 336ms 4 worker, w/ patch: 6105 ms +/- 177ms 8 worker, w/o

Re: Add sub-transaction overflow status in pg_stat_activity

2022-01-13 Thread Bossart, Nathan
Thanks for the new patch! + +Returns a record of information about the backend's subtransactions. +The fields returned are subxact_count identifies +number of active subtransaction and subxact_overflow + shows whether the backend's subtransaction cache is +

Re: do only critical work during single-user vacuum?

2022-01-13 Thread Bossart, Nathan
On 1/13/22, 4:58 AM, "John Naylor" wrote: > On Wed, Jan 12, 2022 at 12:26 PM Bossart, Nathan wrote: >> As I've stated upthread, Sawada-san's suggested approach was my >> initial reaction to this thread. I'm not wedded to the idea of adding >> new options, but I think there are a couple of

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-01-13 Thread Peter Geoghegan
On Thu, Jan 13, 2022 at 12:19 PM Robert Haas wrote: > I can't follow this. If the idea is that we're going to > opportunistically freeze a page whenever that allows us to mark it > all-visible, then the remaining question is what XID age we should use > to force freezing when that rule doesn't

Re: Adding CI to our tree

2022-01-13 Thread Andrew Dunstan
On 1/13/22 13:55, Andres Freund wrote: >> It needs to avoid running on the buildfarm, right ? > I guess so. It currently appears to have its own logic for finding contrib > (and other) tap tests: > > foreach my $testdir (glob("$pgsql/contrib/*")) > { > next unless

Re: Patch: Code comments: why some text-handling functions are leakproof

2022-01-13 Thread Robert Haas
On Tue, Jan 11, 2022 at 2:07 AM Gurjeet Singh wrote: > Please see attached a small patch to document why some text-processing > functions are marked as leakproof, while some others are not. > > This is more or less a verbatim copy of Tom's comment in email thread at [1]. > > I could not find an

Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations

2022-01-13 Thread Robert Haas
On Fri, Jan 7, 2022 at 5:20 PM Peter Geoghegan wrote: > I thought I was being conservative by suggesting > autovacuum_freeze_max_age/2. My first thought was to teach VACUUM to > make its FreezeLimit "OldestXmin - autovacuum_freeze_max_age". To me > these two concepts really *are* the same thing:

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-01-13 Thread Arne Roland
Hi! > From: Tomas Vondra > Subject: Re: PATCH: generate fractional cheapest paths in > generate_orderedappend_path > > test-# SELECT * FROM fract_t x LEFT JOIN fract_t y USING (id1, id2) > ORDER BY id1 ASC, id2 ASC LIMIT 10; >QUERY PLAN > >

Re: tab completion of enum values is broken

2022-01-13 Thread Tom Lane
Peter Eisentraut writes: > This doesn't work anymore: > create type e2 as enum ('foo', 'bar'); > alter type e2 rename value 'b > This now results in > alter type e2 rename value 'b' The main issue here is that Query_for_list_of_enum_values[_with_schema] is designed to match against a pre-quoted

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-01-13 Thread Andres Freund
Hi, On 2021-12-31 18:12:37 +0530, Bharath Rupireddy wrote: > Currently the server is erroring out when unable to remove/parse a > logical rewrite file in CheckPointLogicalRewriteHeap wasting the > amount of work the checkpoint has done and preventing the checkpoint > from finishing. This seems

Re: Adding CI to our tree

2022-01-13 Thread Andres Freund
Hi, On 2022-01-13 13:06:42 -0600, Justin Pryzby wrote: > Question: are data-checksums tested at all ? The only thing I can find is > that > some buildfarm members *might* exercise it during installcheck. There's some coverage via src/bin/pg_basebackup/t/010_pg_basebackup.pl and

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-01-13 Thread Bossart, Nathan
On 1/12/22, 10:03 PM, "Bharath Rupireddy" wrote: > On Thu, Jan 13, 2022 at 3:47 AM Bossart, Nathan wrote: >> The only feedback I have for the patch is that I don't think the new >> comments are necessary. > > I borrowed the comments as-is from the CheckPointSnapBuild introduced > by the commit

Re: Adding CI to our tree

2022-01-13 Thread Justin Pryzby
On Thu, Jan 13, 2022 at 10:55:27AM -0800, Andres Freund wrote: > I'll probably apply that part and 0002 separately. I've hacked on it a bit more now.. Question: are data-checksums tested at all ? The only thing I can find is that some buildfarm members *might* exercise it during installcheck.

Re: UNIQUE null treatment option

2022-01-13 Thread Pavel Borisov
> > I wonder if the logic for setting BTScanInsertData.anynullkeys inside > _bt_mkscankey() is the place to put your test for > rel->rd_index->indnullsnotdistinct -- not inside _bt_doinsert(). That > would probably necessitate renaming anynullkeys, but that's okay. This > feels more natural to me

Re: Adding CI to our tree

2022-01-13 Thread Andres Freund
Hi, On 2022-01-10 16:07:48 -0600, Justin Pryzby wrote: > On Sun, Jan 09, 2022 at 11:57:44AM -0800, Andres Freund wrote: > > On 2022-01-09 13:16:50 -0600, Justin Pryzby wrote: > > > diff --git a/contrib/test_decoding/Makefile > > > b/contrib/test_decoding/Makefile > > > index

Re: UNIQUE null treatment option

2022-01-13 Thread Peter Geoghegan
On Thu, Jan 13, 2022 at 10:36 AM Peter Geoghegan wrote: > I wonder if the logic for setting BTScanInsertData.anynullkeys inside > _bt_mkscankey() is the place to put your test for > rel->rd_index->indnullsnotdistinct -- not inside _bt_doinsert(). That > would probably necessitate renaming

Re: UNIQUE null treatment option

2022-01-13 Thread Peter Geoghegan
On Wed, Dec 29, 2021 at 2:06 AM Peter Eisentraut wrote: > Here is a rebased version of this patch. BTScanInsertData.anynullkeys already effectively means "if the index is a unique index, then we don't actually need to go through _bt_check_unique(), or perform any other checkingunique steps".

Re: Refactoring of compression options in pg_basebackup

2022-01-13 Thread Robert Haas
On Fri, Jan 7, 2022 at 1:43 AM Michael Paquier wrote: > Which is why things should be checked once all the options are > processed. I'd recommend that you read the option patch a bit more, > that may help. I don't think that the problem here is my lack of understanding. I have two basic

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Pavel Stehule
čt 13. 1. 2022 v 19:23 odesílatel Dean Rasheed napsal: > On Thu, 13 Jan 2022 at 17:42, Pavel Stehule > wrote: > > > > I like the idea of prioritizing tables over variables with warnings when > collision is detected. It cannot break anything. And it allows to using > short identifiers when there

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Dean Rasheed
On Thu, 13 Jan 2022 at 17:42, Pavel Stehule wrote: > > I like the idea of prioritizing tables over variables with warnings when > collision is detected. It cannot break anything. And it allows to using short > identifiers when there is not collision. Yeah, that seems OK, as long as it's

Re: Adding CI to our tree

2022-01-13 Thread Andres Freund
Hi, On 2021-12-30 17:46:52 -0800, Andres Freund wrote: > I plan to push this after another cycle of tests passing (and driving > over the bay bridge...) unless I hear protests. I noticed that it's harder to see compile warnings on msvc in CI than it was at an earlier point. There used to be a

Re: disfavoring unparameterized nested loops

2022-01-13 Thread Robert Haas
On Wed, Jan 12, 2022 at 7:20 PM Peter Geoghegan wrote: > Should I take it that you've dropped this project? I was rather hoping > that you'd get back to it, FWIW. Honestly, I'd forgotten all about it. While in theory I'd like to do something about this, but I just have too many other things

Re: Time to drop plpython2?

2022-01-13 Thread Andres Freund
Hi, On 2022-01-11 13:59:32 +0100, Peter Eisentraut wrote: > I suspect at this point, the Meson move isn't going to happen for PostgreSQL > 15. Yes - I IIRC even noted early in the thread that I don't think it's realistic to finish it in time for 15. There's just a good amount of portability

Re: SLRUs in the main buffer pool, redux

2022-01-13 Thread Robert Haas
On Thu, Jan 13, 2022 at 9:00 AM Thomas Munro wrote: > I was re-reviewing the proposed batch of GUCs for controlling the SLRU > cache sizes[1], and I couldn't resist sketching out $SUBJECT as an > obvious alternative. This patch is highly experimental and full of > unresolved bits and pieces (see

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Pavel Stehule
čt 13. 1. 2022 v 18:01 odesílatel Joel Jacobson napsal: > On Thu, Jan 13, 2022, at 20:12, Pavel Stehule wrote: > >I cannot imagine how the "window" keyword can work in SQL context. In > Javascript "window" is an object - it is not a keyword, and it makes sense > in usual Javascript context

Re: Custom Operator for citext LIKE predicates question

2022-01-13 Thread Efrain J. Berdecia
Good points. At least on the limited testing we did, we were able to get the same answer back with both executions; at least for the use cases we tested.  We are still doing more thourough testing. This is an application that is been ported from MS SQL server to postgres and apparently the

Re: Avoiding smgrimmedsync() during nbtree index builds

2022-01-13 Thread Robert Haas
On Wed, Sep 29, 2021 at 2:36 PM Melanie Plageman wrote: > unbuffered_write() and unbuffered_extend() might be able to be used even > if unbuffered_prep() and unbuffered_finish() are not used -- for example > hash indexes do something I don't entirely understand in which they call > smgrextend()

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Joel Jacobson
On Thu, Jan 13, 2022, at 20:12, Pavel Stehule wrote: >I cannot imagine how the "window" keyword can work in SQL context. In >Javascript "window" is an object - it is not a keyword, and it makes sense in >usual Javascript context inside HTML browsers. I was thinking since Javascript is by far

Re: Time to drop plpython2?

2022-01-13 Thread Tom Lane
Peter Eisentraut writes: > On 12.01.22 19:49, Tom Lane wrote: >> Anyway, getting back to the point: I think we should notify the >> owners ASAP and set a 30-day deadline. > Sure, let's do that. I don't have a buildfarm animal these days, so I'm > not on that list, so it would be great if you

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-01-13 Thread Tomas Vondra
FWIW this is now marked as committed. I've created a separate entry in the next CF for the incremental sort part. https://commitfest.postgresql.org/37/3513/ regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Avoiding smgrimmedsync() during nbtree index builds

2022-01-13 Thread Justin Pryzby
On Tue, Jan 11, 2022 at 12:10:54PM -0500, Melanie Plageman wrote: > On Mon, Jan 10, 2022 at 5:50 PM Melanie Plageman > wrote: > > > > I have attached a v3 which includes two commits -- one of which > > implements the directmgr API and uses it and the other which adds > > functionality to use

Re: UNIQUE null treatment option

2022-01-13 Thread Maxim Orlov
I find this patch useful. It includes changes in documentation and tests. Code itself looks reasonable to me. Since, unique constraint check is done by corresponding btree index, it makes this feature implementation elegant and lightweight. In my view, it is sufficient that heap relation can have

Re: tab completion of enum values is broken

2022-01-13 Thread Tom Lane
Peter Eisentraut writes: > This doesn't work anymore: > create type e2 as enum ('foo', 'bar'); > alter type e2 rename value 'b > This now results in > alter type e2 rename value 'b' Ugh. I'll take a look. regards, tom lane

Re: Custom Operator for citext LIKE predicates question

2022-01-13 Thread Tom Lane
"Efrain J. Berdecia" writes: > In our setup it has actually worked per the explains provided making the > query run in milliseconds instead of seconds. To me, "work" includes "get the right answer". I do not think you are getting the same answers that citext would normally provide. If you

Re: 2022-01 Commitfest

2022-01-13 Thread Dmitry Dolgov
> On Wed, Jan 12, 2022 at 01:41:42PM +0800, Julien Rouhaud wrote: > Hi, > > The January commitfest should have started almost two weeks ago, but given > that > nothing happened until now I think that it's safe to assume that either > everyone forgot or no one wanted to volunteer. > > I'm therfore

Re: Time to drop plpython2?

2022-01-13 Thread Peter Eisentraut
On 12.01.22 19:49, Tom Lane wrote: Anyway, getting back to the point: I think we should notify the owners ASAP and set a 30-day deadline. We should try to get this done before the March CF starts, so it's too late for a 60-day grace period. In any case, the worst-case scenario for an owner is

Re: Built-in connection pooler

2022-01-13 Thread Li Japin
On Mar 22, 2021, at 4:59 AM, Zhihong Yu mailto:z...@yugabyte.com>> wrote: Hi, + With load-balancing policy postmaster choose proxy with lowest load average. + Load average of proxy is estimated by number of clients connection assigned to this proxy with extra weight for

Re: Add non-blocking version of PQcancel

2022-01-13 Thread Jelte Fennema
Attached is an updated patch which I believe fixes windows and the other test failures. At least on my machine make check-world passes now when compiled with --enable-tap-tests I also included a second patch which adds some basic documentation for the libpq tests.

Re: Isolation levels on primary and standby

2022-01-13 Thread Bharath Rupireddy
On Thu, Jan 13, 2022 at 4:47 PM RKN Sai Krishna wrote: > > Hello All, > > It looks like we could have different isolation levels on primary and > standby servers in the context of replication. If the primary crashes > and a standby server is made as primary, there could be change in > query

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Pavel Stehule
čt 13. 1. 2022 v 15:29 odesílatel Joel Jacobson napsal: > On Thu, Jan 13, 2022, at 18:24, Dean Rasheed wrote: > > Those are examples that a malicious user might use, but even without > > such examples, I think it would be far too easy to inadvertently break > > a large application by defining a

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Joel Jacobson
On Thu, Jan 13, 2022, at 18:24, Dean Rasheed wrote: > Those are examples that a malicious user might use, but even without > such examples, I think it would be far too easy to inadvertently break > a large application by defining a variable that conflicted with a > column name you didn't know

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Pavel Stehule
čt 13. 1. 2022 v 13:54 odesílatel Dean Rasheed napsal: > On Wed, 3 Nov 2021 at 13:05, Tomas Vondra > wrote: > > > > 2) I find this a bit confusing: > > > > SELECT non_existent_variable; > > test=# select s; > > ERROR: column "non_existent_variable" does not exist > > LINE 1: select

SLRUs in the main buffer pool, redux

2022-01-13 Thread Thomas Munro
Hi, I was re-reviewing the proposed batch of GUCs for controlling the SLRU cache sizes[1], and I couldn't resist sketching out $SUBJECT as an obvious alternative. This patch is highly experimental and full of unresolved bits and pieces (see below for some), but it passes basic tests and is

Re: Logical replication timeout problem

2022-01-13 Thread Amit Kapila
On Thu, Jan 13, 2022 at 3:43 PM Fabrice Chapuis wrote: > > first phase: postgres read WAL files and generate 1420 snap files. > second phase: I guess, but on this point maybe you can clarify, postgres has > to decode the snap files and remove them if no statement must be applied on a >

Re: Non-decimal integer literals

2022-01-13 Thread Peter Eisentraut
Another modest update, because of the copyright year update preventing the previous patches from applying cleanly. I also did a bit of work on the ecpg scanner so that it also handles some errors on par with the main scanner. There is still no automated testing of this in ecpg, but I have a

RE: row filtering for logical replication

2022-01-13 Thread houzj.f...@fujitsu.com
On Thursday, January 13, 2022 2:49 PM Peter Smith > Thanks for posting the merged v63. > > Here are my review comments for the v63-0001 changes. > > ~~~ Thanks for the comments! > 1. src/backend/replication/logical/proto.c - logicalrep_write_tuple > > TupleDesc desc; > - Datum

Re: UNIQUE null treatment option

2022-01-13 Thread Pavel Borisov
+1 for commiting this feature. Consider this useful. -- Best regards, Pavel Borisov Postgres Professional: http://postgrespro.com

RE: row filtering for logical replication

2022-01-13 Thread houzj.f...@fujitsu.com
On Thur, Jan 13, 2022 5:22 PM Alvaro Herrera wrote: > > /* > > + * Only 3 publication actions are used for row filtering ("insert", > > +"update", > > + * "delete"). See RelationSyncEntry.exprstate[]. > > + */ > > +typedef enum RowFilterPubAction > > +{ > > + PUBACTION_INSERT, > > +

Re: do only critical work during single-user vacuum?

2022-01-13 Thread John Naylor
On Wed, Jan 12, 2022 at 12:26 PM Bossart, Nathan wrote: > > > - For the general case, we would now have the ability to vacuum a > > table, and possibly have no effect at all. That seems out of place > > with the other options. > > Perhaps a message would be emitted when tables are specified but >

Re: Schema variables - new implementation for Postgres 15

2022-01-13 Thread Dean Rasheed
On Wed, 3 Nov 2021 at 13:05, Tomas Vondra wrote: > > 2) I find this a bit confusing: > > SELECT non_existent_variable; > test=# select s; > ERROR: column "non_existent_variable" does not exist > LINE 1: select non_existent_variable; > > I wonder if this means using SELECT to read variables is a

Re: Custom Operator for citext LIKE predicates question

2022-01-13 Thread Efrain J. Berdecia
Thank you for the feedback. In our setup it has actually worked per the explains provided making the query run in milliseconds instead of seconds. We weren't sure if this should be something that could be added natively with future Postgres deployments. Thanks,Efrain J. Berdecia On

Re: Pluggable toaster

2022-01-13 Thread Nikita Malakhov
Hi all! Simon, thank you for your review. I'll try to give a brief explanation on some topics you've mentioned. My colleagues would correct me if I miss the point and provide some more details. >Agreed, Oleg has made some very clear analysis of the value of having >a higher degree of control

Re: Isolation levels on primary and standby

2022-01-13 Thread Andrey Borodin
> 13 янв. 2022 г., в 16:16, RKN Sai Krishna > написал(а): > > It looks like we could have different isolation levels on primary and > standby servers in the context of replication. If the primary crashes > and a standby server is made as primary, there could be change in > query results

Re: Support tab completion for upper character inputs in psql

2022-01-13 Thread Peter Eisentraut
On 07.01.22 06:17, tanghy.f...@fujitsu.com wrote: On Friday, January 7, 2022 1:08 PM, Japin Li wrote: +/* + * pg_string_tolower - Fold a string to lower case if the string is not quoted + * and only contains ASCII characters. + * For German/Turkish etc text, no change will be made. + * + * The

tab completion of enum values is broken

2022-01-13 Thread Peter Eisentraut
This doesn't work anymore: create type e2 as enum ('foo', 'bar'); alter type e2 rename value 'b This now results in alter type e2 rename value 'b' Bisecting blames commit cd69ec66c88633c09bc9a984a7f0930e09c7c96e Author: Tom Lane Date: Thu Jan 23 11:07:12 2020 -0500 Improve psql's tab

Isolation levels on primary and standby

2022-01-13 Thread RKN Sai Krishna
Hello All, It looks like we could have different isolation levels on primary and standby servers in the context of replication. If the primary crashes and a standby server is made as primary, there could be change in query results because of isolation levels. Is that expected? Thanks, RKN

Re: Stream replication test fails of cfbot/windows server 2019

2022-01-13 Thread Pavel Borisov
> > For the record, cfbot only started running the recovery tests on > Windows a couple of weeks ago (when the new improved .cirrus.yml > landed in the tree). I don't know if it's significant that Pavel's > patch is failing every time: > >

Re: MDAM techniques and Index Skip Scan patch

2022-01-13 Thread Julien Rouhaud
Hi, On Sat, Oct 23, 2021 at 07:30:47PM +, Floris Van Nee wrote: > > From the patch series above, v9-0001/v9-0002 is the UniqueKeys patch series, > which focuses on the planner. v2-0001 is Dmitry's patch that extends it to > make it possible to use UniqueKeys for the skip scan. Both of these

Re: Add sub-transaction overflow status in pg_stat_activity

2022-01-13 Thread Dilip Kumar
On Tue, Dec 14, 2021 at 6:23 PM Ashutosh Sharma wrote: In the latest patch I have fixed comments given here except a few. I have looked into the v2 patch and here are my comments: + PG_RETURN_INT32(local_beentry->subxact_overflowed); +} Should this be PG_RETURN_BOOL instead of

Re: Add sub-transaction overflow status in pg_stat_activity

2022-01-13 Thread Dilip Kumar
On Fri, Dec 17, 2021 at 9:32 AM Justin Pryzby wrote: > On Fri, Dec 17, 2021 at 09:00:04AM +0530, Dilip Kumar wrote: > > On Tue, Dec 14, 2021 at 3:57 AM Bossart, Nathan > wrote: > > > > > > On 12/13/21, 6:30 AM, "Dilip Kumar" wrote: > > > > On Tue, Dec 7, 2021 at 11:11 AM Justin Pryzby >

Re: Implementing Incremental View Maintenance

2022-01-13 Thread Julien Rouhaud
Hi, On Thu, Nov 25, 2021 at 04:37:10PM +0900, Yugo NAGATA wrote: > On Wed, 24 Nov 2021 04:31:25 + > "r.takahash...@fujitsu.com" wrote: > > > > > I checked the same procedure on v24 patch. > > But following error occurs instead of the original error. > > > > ERROR: relation "ivm_t_index"

Re: row filtering for logical replication

2022-01-13 Thread Amit Kapila
On Wed, Jan 12, 2022 at 7:19 PM houzj.f...@fujitsu.com wrote: > > On Wed, Jan 12, 2022 5:38 PM Amit Kapila wrote: > > Attach the v63 patch set which include the following changes. > Few comments: = 1. + + + + prqual pg_node_tree + + Expression tree (in

Re: Logical replication timeout problem

2022-01-13 Thread Fabrice Chapuis
first phase: postgres read WAL files and generate 1420 snap files. second phase: I guess, but on this point maybe you can clarify, postgres has to decode the snap files and remove them if no statement must be applied on a replicated table. It is from this point that the worker process exit after 1

Re: Add spin_delay() implementation for Arm in s_lock.h

2022-01-13 Thread Blake, Geoff
Tom, Andres, I spun up a 64-core Graviton2 instance (where I reported seeing improvement with this patch) and ran the provided regression test with and without my proposed on top of mainline PG. I ran 4 runs each of 63 workers where we should see the most contention and most impact from the

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

2022-01-13 Thread Pavel Borisov
By the way I've forgotten to add one part of my code into the CF patch related to the treatment of NULL values in checking btree unique constraints. PFA v9 of a patch with this minor code and tests additions. -- Best regards, Pavel Borisov Postgres Professional: http://postgrespro.com

Re: Add Boolean node

2022-01-13 Thread Pavel Stehule
Hi po 3. 1. 2022 v 14:18 odesílatel Peter Eisentraut < peter.eisentr...@enterprisedb.com> napsal: > > On 03.01.22 12:04, Peter Eisentraut wrote: > > On 27.12.21 10:02, Peter Eisentraut wrote: > >> This patch adds a new node type Boolean, to go alongside the "value" > >> nodes Integer, Float,

Re: row filtering for logical replication

2022-01-13 Thread Alvaro Herrera
> /* > + * Only 3 publication actions are used for row filtering ("insert", "update", > + * "delete"). See RelationSyncEntry.exprstate[]. > + */ > +typedef enum RowFilterPubAction > +{ > + PUBACTION_INSERT, > + PUBACTION_UPDATE, > + PUBACTION_DELETE, > + NUM_ROWFILTER_PUBACTIONS

Re: row filtering for logical replication

2022-01-13 Thread Amit Kapila
On Thu, Jan 13, 2022 at 12:19 PM Peter Smith wrote: > > 7. src/backend/replication/pgoutput/pgoutput.c - pgoutput_row_filter > > + /* > + * For the following occasions where there is only one tuple, we can > + * evaluates the row filter for the not null tuple and return. > + * > + * For INSERT:

Re: ICU for global collation

2022-01-13 Thread Peter Eisentraut
On 11.01.22 12:08, Julien Rouhaud wrote: So, unless there are concerns, I'm going to see about making a patch to call pg_newlocale_from_collation() even with the default collation. That would make the actual feature patch quite a bit smaller, since we won't have to patch every call site of

Re: Improve error handling of HMAC computations and SCRAM

2022-01-13 Thread Sergey Shinderuk
On 13.01.2022 10:24, Michael Paquier wrote: Thanks for the review. The comments about pg_hmac_ctx->data were wrong from the beginning, coming, I guess, from one of the earlier patch versions where this was discussed. So I have applied that independently. I have also spent a good amount of

  1   2   >