Re: Improving the comments in pqsignal()

2023-11-23 Thread Heikki Linnakangas
On 24/11/2023 00:33, Thomas Munro wrote: Hi, While following along with Tristan and Heikki's thread about signals in psql, it occurred to me that the documentation atop pqsignal() is not very good: * we don't explain what problem it originally solved * we don't explain why it's still

Re: [PATCH] fix race condition in libpq (related to ssl connections)

2023-11-23 Thread Michael Paquier
On Wed, Nov 22, 2023 at 10:43:32AM +0900, Michael Paquier wrote: > I am not really convinced that we require a second mutex here, as > there is always a concern with inter-locking changes. I may be > missing something, of course, but BIO_s_socket() is just a pointer to > a set of callbacks hidden

Re: How to accurately determine when a relation should use local buffers?

2023-11-23 Thread Давыдов Виталий
Hi Aleksander, I sort of suspect that you are working on a very specific extension and/or feature for PG fork. Any chance you could give us more details about the case?I'm trying to adapt a multimaster solution to some changes in pg16. We replicate temp table DDL due to some reasons.

Re: Don't use bms_membership in places where it's not needed

2023-11-23 Thread Richard Guo
On Fri, Nov 24, 2023 at 12:06 PM David Rowley wrote: > In the attached, I've adjusted the code to use the latter of the two > above methods in 3 places. In examine_variable() this reduces the > complexity of the logic quite a bit and saves calling bms_is_member() > in addition to

Re: [PATCH] fix race condition in libpq (related to ssl connections)

2023-11-23 Thread Michael Paquier
On Wed, Nov 22, 2023 at 02:58:15PM +1300, Thomas Munro wrote: > On Wed, Nov 22, 2023 at 2:44 PM Michael Paquier wrote: >> Because --disable-thread-safe has been removed recently in >> 68a4b58eca03. The routine could be marked as deprecated on top of >> saying that it always returns 1 for 17~. >

Re: Properly pathify the union planner

2023-11-23 Thread Ashutosh Bapat
On Fri, Nov 24, 2023 at 3:59 AM David Rowley wrote: > > Another problem I hit was add_path() pfreeing a Path that I needed. > This was happening due to how I'm building the final paths in the > subquery when setop_pathkeys are set. Because I want to always > include the cheapest_input_path to

Re: POC, WIP: OR-clause support for indexes

2023-11-23 Thread Alena Rybakina
On 23.11.2023 12:23, Andrei Lepikhov wrote: I think the usage of nodeToString for the generation of clause hash is too expensive and buggy. Also, in the code, you didn't resolve hash collisions. So, I've rewritten the patch a bit (see the attachment). One more thing: I propose to enable

Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]

2023-11-23 Thread Pavel Stehule
pá 24. 11. 2023 v 2:12 odesílatel Quan Zongliang napsal: > > > On 2023/11/24 03:39, Pavel Stehule wrote: > > > > > I modified the documentation a little bit - we don't need to extra > > propose SQL array syntax, I think. > > I rewrote regress tests - we don't need to test unsupported > >

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-11-23 Thread Dilip Kumar
On Thu, Nov 23, 2023 at 11:34 AM Dilip Kumar wrote: > > Note: With this testing, we have found a bug in the bank-wise > approach, basically we are clearing a procglobal->clogGroupFirst, even > before acquiring the bank lock that means in most of the cases there > will be a single process in each

Re: trying again to get incremental backup

2023-11-23 Thread Thomas Munro
On Wed, Nov 22, 2023 at 3:14 AM Jakub Wartak wrote: > CFbot failed on two hosts this time, I haven't looked at the details > yet (https://cirrus-ci.com/task/6425149646307328 -> end of EOL? -> > LOG: WAL summarizer process (PID 71511) was terminated by signal 6: > Aborted?) Robert pinged me to

Re: undetected deadlock in ALTER SUBSCRIPTION ... REFRESH PUBLICATION

2023-11-23 Thread Shlok Kyal
Hi, I tried to reproduce the issue and was able to reproduce it with scripts shared by Tomas. I tried testing it from PG17 to PG 11. This issue is reproducible for each version. Next I would try to test with the patch in the thread shared by Amit. Thanks, Shlok Kumar Kyal

Don't use bms_membership in places where it's not needed

2023-11-23 Thread David Rowley
While working on the patch in [1], I noticed that ever since 00b41463c, it's now suboptimal to do the following: switch (bms_membership(relids)) { case BMS_EMPTY_SET: /* handle empty set */ break; case BMS_SINGLETON: /* call bms_singleton_member() and handle

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-11-23 Thread Andrei Lepikhov
On 14/11/2023 17:10, Damir Belyalov wrote:  Here is a very straw-man-level sketch of what I think might work.  The option to COPY FROM looks something like       ERRORS TO other_table_name (item [, item [, ...]]) I tried to implement the patch using a table and came across a

RE: Synchronizing slots from primary to standby

2023-11-23 Thread Zhijie Hou (Fujitsu)
On Thursday, November 23, 2023 11:45 PM Drouvot, Bertrand wrote: Hi, > > On 11/23/23 6:13 AM, Amit Kapila wrote: > > On Tue, Nov 21, 2023 at 4:35 PM Drouvot, Bertrand > > wrote: > >> > >> On 11/21/23 10:32 AM, shveta malik wrote: > >>> On Tue, Nov 21, 2023 at 2:02 PM shveta malik > wrote: >

Re: POC, WIP: OR-clause support for indexes

2023-11-23 Thread Andrei Lepikhov
On 23/11/2023 16:23, Andrei Lepikhov wrote: This code changes tests in many places. But, as I see it, it mostly demonstrates the positive effect of the transformation. I found out that the postgres_fdw tests were impacted by the feature. Fix it, because the patch is on the commitfest and

Re: GUC names in messages

2023-11-23 Thread Michael Paquier
On Thu, Nov 23, 2023 at 06:27:04PM +1100, Peter Smith wrote: > There may be some changes I've missed, but hopefully, this is a nudge > in the right direction. Thanks for spending some time on that. +In messages containing configuration variable names, do not include quotes +when the

Re: [HACKERS] psql casts aspersions on server reliability

2023-11-23 Thread Laurenz Albe
On Thu, 2023-11-23 at 11:12 -0500, Bruce Momjian wrote: > On Wed, Nov 22, 2023 at 10:25:14PM -0500, Bruce Momjian wrote: > > Yes, you are correct. Here is a patch that implements the FATAL test, > > though I am not sure I have the logic correct or backwards, and I don't > > know how to test this.

Re: PATCH: Add REINDEX tag to event triggers

2023-11-23 Thread Michael Paquier
On Fri, Nov 24, 2023 at 08:00:00AM +0800, jian he wrote: > not sure this is the right approach. But now the reindex event > collection is after we call index_open. > same static function (reindex_event_trigger_collect) in > src/backend/commands/indexcmds.c and src/backend/catalog/index.c for >

Re: Adding facility for injection points (or probe points?) for more advanced tests

2023-11-23 Thread Michael Paquier
On Wed, Nov 22, 2023 at 09:23:21PM +0530, Ashutosh Bapat wrote: > On Tue, Nov 21, 2023 at 6:56 AM Michael Paquier wrote: >> I've never seen in recent years a need for a given test to use more >> than 4~5 points. But I guess that you've seen more than that wanted >> in a prod environment with a

Re: pg_upgrade and logical replication

2023-11-23 Thread Peter Smith
I have only trivial review comments for patch v18-0001 == src/bin/pg_upgrade/check.c 1. check_new_cluster_subscription_configuration + /* + * A slot not created yet refers to the 'i' (initialize) state, while + * 'r' (ready) state refer to a slot created previously but already + * dropped.

Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]

2023-11-23 Thread Quan Zongliang
On 2023/11/24 03:39, Pavel Stehule wrote: I modified the documentation a little bit - we don't need to extra propose SQL array syntax, I think. I rewrote regress tests - we don't need to test unsupported functionality (related to RECORD). - all tests passed I wrote two examples of

Re: PATCH: Add REINDEX tag to event triggers

2023-11-23 Thread jian he
On Mon, Nov 20, 2023 at 3:34 PM Michael Paquier wrote: > > On Sat, Oct 28, 2023 at 12:15:22PM +0800, jian he wrote: > > reindex_event_trigger_collect_relation called in > > ReindexMultipleInternal, ReindexTable (line 2979). > > Both are "under concurrent is false" branches. > > > > So it should

Re: Table AM Interface Enhancements

2023-11-23 Thread Matthias van de Meent
Hi, On Thu, 23 Nov 2023 at 13:43, Alexander Korotkov wrote: > > Hello PostgreSQL Hackers, > > I am pleased to submit a series of patches related to the Table Access > Method (AM) interface, which I initially announced during my talk at > PGCon 2023 [1]. These patches are primarily designed to

Improving the comments in pqsignal()

2023-11-23 Thread Thomas Munro
Hi, While following along with Tristan and Heikki's thread about signals in psql, it occurred to me that the documentation atop pqsignal() is not very good: * we don't explain what problem it originally solved * we don't explain why it's still needed today * we don't explain what else it does

Re: Properly pathify the union planner

2023-11-23 Thread David Rowley
On Thu, 2 Nov 2023 at 12:42, David Rowley wrote: > One part that still needs work is the EquivalanceClass building. > Because we only build the final targetlist for the Append after > planning all the append child queries, I ended up having to populate > the EquivalanceClasses backwards, i.e

Re: Questions regarding Index AMs and natural ordering

2023-11-23 Thread Peter Geoghegan
On Thu, Nov 23, 2023 at 11:15 AM Tom Lane wrote: > Agreed on that, but I don't have that hard a time imagining cases > where it might be useful for btree not to guarantee ordered output. > IIRC, it currently has to do extra pushups to ensure that behavior > in ScalarArrayOp cases. We've not

Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]

2023-11-23 Thread Pavel Stehule
čt 23. 11. 2023 v 13:28 odesílatel Quan Zongliang napsal: > > > On 2023/11/20 17:33, Pavel Stehule wrote: > > > > > > > I did some deeper check: > > > > - I don't like too much parser's modification (I am sending alternative > > own implementation) - the SQL parser allows richer syntax, and for

Re: Questions regarding Index AMs and natural ordering

2023-11-23 Thread Tom Lane
Peter Geoghegan writes: > On Thu, Nov 23, 2023 at 9:16 AM Matthias van de Meent > wrote: >> Is returning index scan results in (reverse) natural order not >> optional but required with amcanorder? If it is required, why is the >> am indicator called 'canorder' instead of 'willorder', 'doesorder'

Re: Questions regarding Index AMs and natural ordering

2023-11-23 Thread Peter Geoghegan
On Thu, Nov 23, 2023 at 9:16 AM Matthias van de Meent wrote: > For example, btree ignores any ordering scan keys that it is given in > btrescan, which seems fine for btree because the ordering of a btree > is static (and no other order than that is expected apart from it's > reverse order), but

Re: Use index to estimate expression selectivity

2023-11-23 Thread Tomas Vondra
On 11/23/23 18:30, Tom Lane wrote: > Bono Stebler writes: >> After discussing the issue on irc, it looks like it could be possible >> for the planner to use a partial index matching an expression exactly to >> estimate its selectivity. > > I think going forward we're going to be more

Re: Use index to estimate expression selectivity

2023-11-23 Thread Tom Lane
Bono Stebler writes: > After discussing the issue on irc, it looks like it could be possible > for the planner to use a partial index matching an expression exactly to > estimate its selectivity. I think going forward we're going to be more interested in extending CREATE STATISTICS than in

Questions regarding Index AMs and natural ordering

2023-11-23 Thread Matthias van de Meent
Hi, Over in [0] and [1] there are patches that touch on the topic of 'natual ordering' index retrieval, and [2] also touches on the topic. For those patches, I've been looking at how the planner and executor indicate to index AMs that they expects the output to be ordered, and how this ordering

Re: autovectorize page checksum code included elsewhere

2023-11-23 Thread Nathan Bossart
On Thu, Nov 23, 2023 at 05:50:48PM +0700, John Naylor wrote: > On Thu, Nov 23, 2023 at 1:49 AM Nathan Bossart > wrote: >> One half-formed idea I have is to introduce some sort of ./configure flag >> that enables all the newer instructions that your CPU understands. > > That's not doable, It's

Re: undetected deadlock in ALTER SUBSCRIPTION ... REFRESH PUBLICATION

2023-11-23 Thread Tomas Vondra
On 11/23/23 10:24, Amit Kapila wrote: > On Wed, Nov 22, 2023 at 4:51 PM Tomas Vondra > wrote: >> >> On 11/22/23 11:38, Amit Kapila wrote: >>> >>> Okay. IIUC, what's going on here is that the apply worker acquires >>> AccessShareLock on pg_subscription to update rel state for one of the >>>

Re: Catalog domain not-null constraints

2023-11-23 Thread Alvaro Herrera
On 2023-Nov-23, Peter Eisentraut wrote: > This patch set applies the explicit catalog representation of not-null > constraints introduced by b0e96f3119 for table constraints also to domain > not-null constraints. I like the idea of having domain not-null constraints appear in pg_constraint. >

Re: Catalog domain not-null constraints

2023-11-23 Thread Alvaro Herrera
On 2023-Nov-23, Aleksander Alekseev wrote: > Interestingly enough according to the documentation this syntax is > already supported [1][2], but the actual query will fail on `master`: > > ``` > =# create domain connotnull integer; > CREATE DOMAIN > =# alter domain connotnull add not null value;

Re: [HACKERS] psql casts aspersions on server reliability

2023-11-23 Thread Bruce Momjian
On Wed, Nov 22, 2023 at 10:25:14PM -0500, Bruce Momjian wrote: > On Wed, Nov 22, 2023 at 07:38:52PM -0500, Tom Lane wrote: > > Bruce Momjian writes: > > > On Wed, Sep 28, 2016 at 09:14:41AM -0400, Tom Lane wrote: > > >> I could go along with just dropping the last sentence ("This > > >>

Re: Synchronizing slots from primary to standby

2023-11-23 Thread Drouvot, Bertrand
Hi, On 11/23/23 6:13 AM, Amit Kapila wrote: On Tue, Nov 21, 2023 at 4:35 PM Drouvot, Bertrand wrote: On 11/21/23 10:32 AM, shveta malik wrote: On Tue, Nov 21, 2023 at 2:02 PM shveta malik wrote: v37 fails to apply to HEAD due to a recent commit e83aa9f92fdd, rebased the patches. PFA

Does pg support to write a new buffer cache as an extension?

2023-11-23 Thread jacktby jacktby

Re: PoC: prefetching index leaf pages (for inserts)

2023-11-23 Thread Tomas Vondra
On 11/23/23 14:26, Heikki Linnakangas wrote: > On 06/11/2023 19:05, Tomas Vondra wrote: >> As for the path forward, I think the prefetching is demonstrably >> beneficial. There are cases where it can't help or even harms >> performance. I think the success depends on three areas: >> >> (a)

Re: [HACKERS] pg_upgrade vs vacuum_cost_delay

2023-11-23 Thread Magnus Hagander
On Thu, Nov 23, 2023 at 5:23 AM Bruce Momjian wrote: > > On Thu, Jun 16, 2016 at 04:45:14PM +0200, Magnus Hagander wrote: > > On Thu, Jun 16, 2016 at 4:35 PM, Euler Taveira wrote: > > > > On 16-06-2016 09:05, Magnus Hagander wrote: > > > Shouldn't pg_upgrade turn off vacuum cost delay

Use index to estimate expression selectivity

2023-11-23 Thread Bono Stebler
Dear hackers, After discussing the issue on irc, it looks like it could be possible for the planner to use a partial index matching an expression exactly to estimate its selectivity. Here is a simplified version (thanks ysch) of the issue I am facing: https://dbfiddle.uk/flPq8-pj I have

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-11-23 Thread Amul Sul
On Mon, Nov 20, 2023 at 1:12 PM Peter Eisentraut wrote: > On 17.11.23 13:25, Amul Sul wrote: > > To fix this we should be doing something like ALTER COLUMN TYPE and the > pass > > should be AT_PASS_ALTER_TYPE (rename it or invent a new one near to > that) so > > that in ATRewriteCatalogs(), we

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-23 Thread Tomas Vondra
On 11/23/23 13:33, Matthias van de Meent wrote: > Hi, > > On Wed, 22 Nov 2023 at 20:16, Tomas Vondra > wrote: >> >> On 11/20/23 20:48, Matthias van de Meent wrote: >>> On Wed, 8 Nov 2023 at 12:03, Tomas Vondra >>> wrote: Hi, here's an updated patch, addressing the review

Re: PoC: prefetching index leaf pages (for inserts)

2023-11-23 Thread Heikki Linnakangas
On 06/11/2023 19:05, Tomas Vondra wrote: As for the path forward, I think the prefetching is demonstrably beneficial. There are cases where it can't help or even harms performance. I think the success depends on three areas: (a) reducing the costs of the prefetching - For example right now we

Re: Catalog domain not-null constraints

2023-11-23 Thread Aleksander Alekseev
Hi, > This patch set applies the explicit catalog representation of not-null > constraints introduced by b0e96f3119 for table constraints also to > domain not-null constraints. Interestingly enough according to the documentation this syntax is already supported [1][2], but the actual query will

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-23 Thread Matthias van de Meent
Hi, On Wed, 22 Nov 2023 at 20:16, Tomas Vondra wrote: > > On 11/20/23 20:48, Matthias van de Meent wrote: >> On Wed, 8 Nov 2023 at 12:03, Tomas Vondra >> wrote: >>> >>> Hi, >>> >>> here's an updated patch, addressing the review comments, and reworking >>> how the work is divided between the

Re: PL/pgSQL: Incomplete item Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]

2023-11-23 Thread Quan Zongliang
On 2023/11/20 17:33, Pavel Stehule wrote: I did some deeper check: - I don't like too much parser's modification (I am sending alternative own implementation) - the SQL parser allows richer syntax, and for full functionality is only few lines more Agree. - original patch doesn't

RE: Random pg_upgrade test failure on drongo

2023-11-23 Thread Hayato Kuroda (Fujitsu)
Dear Alexander, > > I can easily reproduce this failure on my workstation by running 5 tests > 003_logical_slots in parallel inside Windows VM with it's CPU resources > limited to 50%, like so: > VBoxManage controlvm "Windows" cpuexecutioncap 50 > > set PGCTLTIMEOUT=180 > python3 -c

Re: WaitEventSet resource leakage

2023-11-23 Thread Heikki Linnakangas
On 22/11/2023 15:00, Alexander Lakhin wrote: I can also confirm that the patches proposed (for master and back branches) eliminate WES leakage as expected. Thanks for the fix! Maybe you would find appropriate to add the comment /* Convenience wrappers over ResourceOwnerRemember/Forget */ above

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-11-23 Thread Dean Rasheed
On Mon, 14 Aug 2023 at 18:34, David Zhang wrote: > > it would be great to switch the order of the 3rd and the 4th line to make a > better match for "CREATE" and "CREATE OR REPLACE" . > I took a look at this, and I think it's probably neater to keep the "AS SELECT" completion for CREATE [OR

Re: Random pg_upgrade test failure on drongo

2023-11-23 Thread Alexander Lakhin
Hello Kuroda-san, 21.11.2023 13:37, Hayato Kuroda (Fujitsu) wrote: This email tells an update. The machine drongo failed the test a week ago [1] and finally got logfiles. PSA files. Oh, sorry. I missed to attach files. You can see pg_upgrade_server.log for now. I can easily reproduce this

Re: Question about the Implementation of vector32_is_highbit_set on ARM

2023-11-23 Thread John Naylor
On Thu, Nov 23, 2023 at 4:29 PM Xiang Gao wrote: > > Thank you for your detailed explanation. > Can I do some testing and submit this patch? Please do, thanks.

Re: autovectorize page checksum code included elsewhere

2023-11-23 Thread John Naylor
On Thu, Nov 23, 2023 at 1:49 AM Nathan Bossart wrote: > > On Wed, Nov 22, 2023 at 02:54:13PM +0200, Ants Aasma wrote: > > On Wed, 22 Nov 2023 at 11:44, John Naylor wrote: > >> Poking in those files a bit, I also see references to building with > >> SSE 4.1. Maybe that's an avenue that we should

Re: remaining sql/json patches

2023-11-23 Thread jian he
+/* + * Evaluate or return the step address to evaluate a coercion of a JSON item + * to the target type. The former if the coercion must be done right away by + * calling the target type's input function, and for some types, by calling + * json_populate_type(). + * + * Returns the step address

Re: [Proposal] global sequence implemented by snowflake ID

2023-11-23 Thread Michael Paquier
On Thu, Nov 23, 2023 at 10:18:59AM +, Hayato Kuroda (Fujitsu) wrote: > * Implement as a variant of sequence access method. I found that sequence AM > was > proposed many years ago [5], but it has not been active now. It might be a > fundamental way but needs a huge works. Well, that's

Re: Synchronizing slots from primary to standby

2023-11-23 Thread Amit Kapila
On Wed, Nov 22, 2023 at 10:02 AM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, November 21, 2023 5:33 PM shveta malik > wrote: > > > > > > v37 fails to apply to HEAD due to a recent commit e83aa9f92fdd, rebased the > > patches. PFA v37_2 patches. > > Thanks for updating the patches. > > I'd like

Re: Change GUC hashtable to use simplehash?

2023-11-23 Thread John Naylor
On Thu, Nov 23, 2023 at 5:34 AM Andres Freund wrote: > It's worth noting that the limited range of the input values means that > there's a lot of bias toward some bits being set ('a' to 'z' all start with > 0b011). We can take advantage of the limited range with a single additional instruction:

[Proposal] global sequence implemented by snowflake ID

2023-11-23 Thread Hayato Kuroda (Fujitsu)
Hi hackers, I want to discuss a new feature for assigning a snowflake ID[1], which can be cluster-wide unique numbers. Also, Snowflake ID can be allocated standalone. # Use case A typical use case is a multi-master system constructed by logical replication. This feature allows multi-node system

Re: Synchronizing slots from primary to standby

2023-11-23 Thread Ajin Cherian
On Tue, Nov 21, 2023 at 8:32 PM shveta malik wrote: > > v37 fails to apply to HEAD due to a recent commit e83aa9f92fdd, > rebased the patches. PFA v37_2 patches. Thanks for the patch. Some comments: subscriptioncmds.c: CreateSubscription() and tablesync.c: process_syncing_tables_for_apply()

Re: should check collations when creating partitioned index

2023-11-23 Thread Peter Eisentraut
On 20.11.23 17:25, Tom Lane wrote: Peter Eisentraut writes: On 14.11.23 17:15, Tom Lane wrote: I don't love the patch details though. It seems entirely wrong to check this before we check the opclass match. Not sure why? The order doesn't seem to matter? The case that was bothering me

RE: Question about the Implementation of vector32_is_highbit_set on ARM

2023-11-23 Thread Xiang Gao
On Date: Mon, 20 Nov 2023 16:05:43PM +0700, John Naylor wrote: >On Wed, Nov 8, 2023 at 2:44=E2=80=AFPM Xiang Gao wrote: >> * function. We could instead adopt the behavior of Arm's vmaxvq_u32(), i= >.e. >> * check each 32-bit element, but that would require an additional mask >> * operation on

Re: undetected deadlock in ALTER SUBSCRIPTION ... REFRESH PUBLICATION

2023-11-23 Thread Amit Kapila
On Wed, Nov 22, 2023 at 4:51 PM Tomas Vondra wrote: > > On 11/22/23 11:38, Amit Kapila wrote: > > > > Okay. IIUC, what's going on here is that the apply worker acquires > > AccessShareLock on pg_subscription to update rel state for one of the > > tables say tbl-1, and then for another table say

Re: POC, WIP: OR-clause support for indexes

2023-11-23 Thread Andrei Lepikhov
On 21/11/2023 18:31, Alena Rybakina wrote: Sorry, I lost your changes  during the revision process. I returned them. I raised the patch version just in case to run ci successfully. I think the usage of nodeToString for the generation of clause hash is too expensive and buggy. Also, in the

Re: psql not responding to SIGINT upon db reconnection

2023-11-23 Thread Heikki Linnakangas
On 22/11/2023 23:29, Tristan Partin wrote: Ha, you're right. I had this working yesterday, but convinced myself it didn't. I had a do while loop wrapping the blocking call. Here is a v4, which seems to pass the tests that were pointed out to be failing earlier. Thanks! This suffers from a

Re: SQL:2011 application time

2023-11-23 Thread Peter Eisentraut
On 20.11.23 08:58, Peter Eisentraut wrote: On 17.11.23 19:39, Paul Jungwirth wrote: But I feel the overall approach is wrong: originally I used hardcoded "=" and "&&" operators, and you asked me to look them up by strategy number instead. But that leads to trouble with core gist types vs

Re: pgoutput incorrectly replaces missing values with NULL since PostgreSQL 15

2023-11-23 Thread Amit Kapila
On Thu, Nov 23, 2023 at 1:10 PM Nikhil Benesch wrote: > > While working on Materialize's streaming logical replication from Postgres > [0], > my colleagues Sean Loiselle and Petros Angelatos (CC'd) discovered today what > appears to be a correctness bug in pgoutput, introduced in v15. > > The

Re: pg_upgrade and logical replication

2023-11-23 Thread vignesh C
On Thu, 23 Nov 2023 at 05:56, Peter Smith wrote: > > Here are some review comments for patch v17-0001 > > == > src/bin/pg_dump/pg_dump.c > > 1. getSubscriptionTables > > +/* > + * getSubscriptionTables > + * Get information about subscription membership for dumpable tables. This > + *

Re: pg_upgrade and logical replication

2023-11-23 Thread vignesh C
On Tue, 21 Nov 2023 at 07:11, Michael Paquier wrote: > > On Mon, Nov 20, 2023 at 09:49:41AM +0530, Amit Kapila wrote: > > On Tue, Nov 14, 2023 at 7:21 AM vignesh C wrote: > >> There are couple of things happening here: a) In the first part we > >> take care of setting subscription relation to

Re: How to stop autovacuum silently

2023-11-23 Thread Maxim Orlov
On Wed, 22 Nov 2023 at 21:13, Peter Geoghegan wrote: > Are you aware of commit e83ebfe6d7, which added a similar WARNING at > the point when VACUUM overwrites a relfrozenxid/relminmxid "from the > future"? It's a recent one. > Thank you for reply! I hadn't noticed it. But in described above

Re: patch: improve "user mapping not found" error message

2023-11-23 Thread Peter Eisentraut
On 20.11.23 02:25, Ian Lawrence Barwick wrote: 2023年7月3日(月) 18:22 Peter Eisentraut : On 23.06.23 09:45, Ian Lawrence Barwick wrote: if (!HeapTupleIsValid(tp)) + { + ForeignServer *server = GetForeignServer(serverid); + ereport(ERROR,

confusion about Re: Write operations in parallel mode's update part.

2023-11-23 Thread jiye
hi, i found a discuss about parallel dml, it wrote as follow, PostgreSQL: Re: Write operations in parallel mode Make updates and deletes parallel-restricted rather than parallel-unsafe - i.e. allow updates and deletes but only in the leader. This similarly would allow Update -> Gather ->

Re: [PATCH] Add CHECK_FOR_INTERRUPTS in scram_SaltedPassword loop.

2023-11-23 Thread Aleksander Alekseev
Hi, > > If we want to add CHECK_FOR_INTERRUPTS inside the loop I think a brief > > comment would be appropriate. > > This has been completed in patch v2 and it's ready for review. Thanks! > > I don't think it would be useful to limit this at an arbitrary point, > > iteration > > count can be

RE: CRC32C Parallel Computation Optimization on ARM

2023-11-23 Thread Xiang Gao
On Date: Wed, 22 Nov 2023 15:06:18PM -0600, Nathan Bossart wrote: >> On Date: Fri, 10 Nov 2023 10:36:08AM -0600, Nathan Bossart wrote: >>>+__attribute__((target("+crc+crypto"))) >>> >>>I'm not sure we can assume that all compilers will understand this, and I'm >>>not sure we need it. >> >>