Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-07 Thread Bertrand Drouvot
Hi, On Sat, Jan 06, 2024 at 10:18:52AM -0600, Nathan Bossart wrote: > On Sat, Jan 06, 2024 at 09:03:52AM +, Bertrand Drouvot wrote: > > Sorry, I missed this in my first review, but instead of: > > > > - input: files('../../backend/storage/lmgr/lwlocknames.txt'), > > + input:

Re: Add a perl function in Cluster.pm to generate WAL

2024-01-07 Thread Bertrand Drouvot
Hi, On Mon, Jan 08, 2024 at 09:16:19AM +0900, Michael Paquier wrote: > On Sun, Jan 07, 2024 at 05:00:00PM +0300, Alexander Lakhin wrote: > > Yes, I wrote exactly about that upthread and referenced my previous > > investigation. But what I'm observing now, is that the failure probability > >

Escape output of pg_amcheck test

2024-01-07 Thread Peter Eisentraut
The pg_amcheck reports a skip message if the layout of the index does not match expectations. That message includes the bytes that were expected and the ones that were found. But the found ones are arbitrary bytes, which can have funny effects on the terminal when they are printed. To avoid

Re: Change GUC hashtable to use simplehash?

2024-01-07 Thread Junwang Zhao
Hi John, On Mon, Jan 8, 2024 at 10:44 AM John Naylor wrote: > > On Sat, Jan 6, 2024 at 9:01 AM jian he wrote: > > > > latency average = 147.782 ms > > select * from bench_cstring_hash_unaligned(10); > > latency average = 101.179 ms > > select * from bench_cstring_hash_aligned(10); > >

Re: Documentation to upgrade logical replication cluster

2024-01-07 Thread Bharath Rupireddy
On Thu, Jan 4, 2024 at 2:22 PM vignesh C wrote: > > Hi, > > We have documentation on how to upgrade "publisher" and "subscriber" > at [1], but currently we do not have any documentation on how to > upgrade logical replication clusters. > Here is a patch to document how to upgrade different

RE: speed up a logical replica setup

2024-01-07 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > On Fri, Jan 5, 2024 at 3:36 PM Hayato Kuroda (Fujitsu) > wrote: > > > > I love your proposal, so I want to join the review. Here are my first > > comments. > > > > 01. > > Should we restrict that `--subscriber-conninfo` must not have hostname or > > IP? > > We want users to

Re: add AVX2 support to simd.h

2024-01-07 Thread John Naylor
On Thu, Nov 30, 2023 at 12:15 AM Nathan Bossart wrote: > Using the same benchmark as we did for the SSE2 linear searches in > XidInMVCCSnapshot() (commit 37a6e5d) [1] [2], I see the following: I've been antagonistic towards the patch itself, but it'd be more productive if I paid some nuanced

Re: More new SQL/JSON item methods

2024-01-07 Thread Jeevan Chalke
On Thu, Jan 4, 2024 at 2:34 AM Peter Eisentraut wrote: > On 03.01.24 13:01, Peter Eisentraut wrote: > > On 07.12.23 14:24, Jeevan Chalke wrote: > >> We have the same issue with integer conversion and need a fix. > >> > >> Unfortunately, I was using int8in() for the conversion of numeric > >>

Commitfest 2024-01 first week update

2024-01-07 Thread vignesh C
Hi, Here's a quick status report after the first week: Status summary: Needs review: 238. Waiting on Author: 44. Ready for Committer: 27. Committed: 36. Moved to next CF: 1. Withdrawn: 2. Returned with Feedback: 3. Rejected: 1. Total: 352. Here is a list of "Needs review" entries

Re: alter table add x wrong error position

2024-01-07 Thread David G. Johnston
On Sunday, January 7, 2024, jian he wrote: > hi. > Maybe this is a small printout err_position bug. > > create table atacc2 ( test int, a int, b int) ; > success tests: > alter table atacc2 add CONSTRAINT x PRIMARY KEY (id, b ); > alter table atacc2 add CONSTRAINT x PRIMARY KEY (id, b a); >

Re: Synchronizing slots from primary to standby

2024-01-07 Thread Dilip Kumar
On Fri, Jan 5, 2024 at 5:45 PM Amit Kapila wrote: > > On Fri, Jan 5, 2024 at 4:25 PM Dilip Kumar wrote: > > > > On Fri, Jan 5, 2024 at 8:59 AM shveta malik wrote: > > > > > I was going the the patch set again, I have a question. The below > > comments say that we keep the failover option as

Re: psql not responding to SIGINT upon db reconnection

2024-01-07 Thread Tristan Partin
On Fri Jan 5, 2024 at 12:24 PM CST, Robert Haas wrote: On Tue, Dec 5, 2023 at 1:35 PM Tristan Partin wrote: > On Wed Nov 29, 2023 at 11:48 AM CST, Tristan Partin wrote: > > I am not completely in love with the code I have written. Lots of > > conditional compilation which makes it hard to read.

alter table add x wrong error position

2024-01-07 Thread jian he
hi. Maybe this is a small printout err_position bug. create table atacc2 ( test int, a int, b int) ; success tests: alter table atacc2 add CONSTRAINT x PRIMARY KEY (id, b ); alter table atacc2 add CONSTRAINT x PRIMARY KEY (id, b a); alter table atacc2 add CONSTRAINT x PRIMARY KEYa (id, b); tests

Re: introduce dynamic shared memory registry

2024-01-07 Thread Amul Sul
On Mon, Jan 8, 2024 at 10:53 AM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Sat, Jan 6, 2024 at 10:05 PM Nathan Bossart > wrote: > > > > I kept this the same, as I didn't see any need to tie the key size to > > NAMEDATALEN. > > Thanks. A fresh look at the v5 patches

Re: speed up a logical replica setup

2024-01-07 Thread Amit Kapila
On Fri, Jan 5, 2024 at 3:36 PM Hayato Kuroda (Fujitsu) wrote: > > I love your proposal, so I want to join the review. Here are my first > comments. > > 01. > Should we restrict that `--subscriber-conninfo` must not have hostname or IP? > We want users to execute pg_subscriber on the target,

Re: Adding a pg_get_owned_sequence function?

2024-01-07 Thread vignesh C
On Tue, 24 Oct 2023 at 22:00, Nathan Bossart wrote: > > On Tue, Sep 12, 2023 at 03:53:28PM +0100, Dagfinn Ilmari Mannsåker wrote: > > Tom Lane writes: > >> It's possible that we could get away with just summarily changing > >> the argument type from text to regclass. ISTR that we did exactly >

Re: introduce dynamic shared memory registry

2024-01-07 Thread Bharath Rupireddy
On Sat, Jan 6, 2024 at 10:05 PM Nathan Bossart wrote: > > I kept this the same, as I didn't see any need to tie the key size to > NAMEDATALEN. Thanks. A fresh look at the v5 patches left me with the following thoughts: 1. I think we need to add some notes about this new way of getting shared

Re: proposal: psql: show current user in prompt

2024-01-07 Thread vignesh C
On Tue, 12 Sept 2023 at 14:39, Peter Eisentraut wrote: > > On 11.09.23 13:59, Jelte Fennema wrote: > > @Tom and @Robert, since you originally suggested extending the > > protocol for this, I think some input from you on the protocol design > > would be quite helpful. BTW, this protocol extension

Re: Forbid the use of invalidated physical slots in streaming replication.

2024-01-07 Thread vignesh C
On Fri, 8 Dec 2023 at 19:15, Ashutosh Bapat wrote: > > > > > pg_replication_slot could be set back to null. > > > > > > In this case, since the basebackup was taken after the slot was > > > invalidated, it > > > does not require the WAL that was removed. But it seems that once the > > >

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

2024-01-07 Thread Amul Sul
On Fri, Jan 5, 2024 at 12:28 AM Peter Eisentraut wrote: > On 25.12.23 13:10, Amul Sul wrote: > > > I have committed this patch set. > > I couple of notes: > > You had included the moving of the AT_PASS_ADD_COL enum in the first > patch. This is not a good style. Refactoring patches should not

Re: Multidimensional Histograms

2024-01-07 Thread Andrei Lepikhov
On 8/1/2024 01:36, Tomas Vondra wrote: On 1/7/24 18:26, Andrei Lepikhov wrote: On 7/1/2024 17:51, Tomas Vondra wrote: On 1/7/24 11:22, Andrei Lepikhov wrote: On 7/1/2024 06:54, Tomas Vondra wrote: It's an interesting are for experiments, no doubt about it. And if you choose to explore it,

Re: the s_lock_stuck on perform_spin_delay

2024-01-07 Thread Andy Fan
Hi! > > I think we should add cassert-only infrastructure tracking whether we > currently hold spinlocks, are in a signal handler and perhaps a few other > states. That'd allow us to add assertions like: .. > - no lwlocks or ... while in signal handlers I *wish* lwlocks should *not* be held

Re: Change GUC hashtable to use simplehash?

2024-01-07 Thread John Naylor
On Sat, Jan 6, 2024 at 9:01 AM jian he wrote: > > latency average = 147.782 ms > select * from bench_cstring_hash_unaligned(10); > latency average = 101.179 ms > select * from bench_cstring_hash_aligned(10); > latency average = 101.219 ms Thanks for testing again! This looks closer to my

Re: add function argument names to regex* functions.

2024-01-07 Thread Dian Fay
On Thu Jan 4, 2024 at 2:03 AM EST, jian he wrote: > On Thu, Jan 4, 2024 at 7:26 AM Jim Nasby wrote: > > > > On 1/3/24 5:05 PM, Dian Fay wrote: > > > > Another possibility is `index`, which is relatively short and not a > > reserved keyword ^1. `position` is not as precise but would avoid the > >

Re: Add a perl function in Cluster.pm to generate WAL

2024-01-07 Thread Michael Paquier
On Sun, Jan 07, 2024 at 05:00:00PM +0300, Alexander Lakhin wrote: > Yes, I wrote exactly about that upthread and referenced my previous > investigation. But what I'm observing now, is that the failure probability > greatly increased with c161ab74f, so something really changed in the test >

Re: Extract numeric filed in JSONB more effectively

2024-01-07 Thread jian he
On Sun, Jan 7, 2024 at 3:26 PM Andy Fan wrote: > > > Hi, > > > hi. > > you don't need to change src/include/catalog/catversion.h > > as mentioned in https://wiki.postgresql.org/wiki/Committing_checklist > > Otherwise, cfbot will fail many times. > > Thanks for the wiki. > > I checked the wiki and

Re: remaining sql/json patches

2024-01-07 Thread jian he
On Sat, Jan 6, 2024 at 8:44 AM jian he wrote: > > some tests after applying V33 and my small changes. > setup: > create table test_scalar1(js jsonb); > insert into test_scalar1 select jsonb '{"a":"[12,13]"}' FROM > generate_series(1,1e5) g; > create table test_scalar2(js jsonb); > insert into

Re: Multidimensional Histograms

2024-01-07 Thread Alexander Cheshev
Hi Tomas, > See section 3.2 in this paper (the "view PDF" does not work for me, but > the "source PDF" does download a postscript): I believe that you are referring to a dynamic programming approach. It is a 1-dimensional case! To find an optimal solution in the M-dimensional case is an NP-hard

Re: Multidimensional Histograms

2024-01-07 Thread Tomas Vondra
On 1/7/24 23:53, Alexander Cheshev wrote: > Hi Tomas, > >> The thing I was proposing is that it should be possible to build >> histograms with bins adapted to density in the given region. With >> smaller buckets in areas with high density. So that queries intersect >> with fewer buckets in

Re: Multidimensional Histograms

2024-01-07 Thread Alexander Cheshev
Hi Tomas, > The thing I was proposing is that it should be possible to build > histograms with bins adapted to density in the given region. With > smaller buckets in areas with high density. So that queries intersect > with fewer buckets in low-density parts of the histogram. This is how

Re: Password leakage avoidance

2024-01-07 Thread Joe Conway
On 1/6/24 15:10, Tom Lane wrote: Joe Conway writes: The only code specific comments were Tom's above, which have been addressed. If there are no serious objections I plan to commit this relatively soon. I had not actually read this patchset before, but now I have, and I have a few minor

Re: Multidimensional Histograms

2024-01-07 Thread Tomas Vondra
On 1/7/24 18:26, Andrei Lepikhov wrote: > On 7/1/2024 17:51, Tomas Vondra wrote: >> On 1/7/24 11:22, Andrei Lepikhov wrote: >>> On 7/1/2024 06:54, Tomas Vondra wrote: It's an interesting are for experiments, no doubt about it. And if you choose to explore it, that's fine. But it's

Re: Multidimensional Histograms

2024-01-07 Thread Andrei Lepikhov
On 7/1/2024 17:51, Tomas Vondra wrote: On 1/7/24 11:22, Andrei Lepikhov wrote: On 7/1/2024 06:54, Tomas Vondra wrote: It's an interesting are for experiments, no doubt about it. And if you choose to explore it, that's fine. But it's better to be aware it may not end with a commit. For the

Re: Add a perl function in Cluster.pm to generate WAL

2024-01-07 Thread Alexander Lakhin
07.01.2024 10:10, Michael Paquier wrote: On Fri, Jan 05, 2024 at 11:00:00PM +0300, Alexander Lakhin wrote: Your suspicion was proved right. After git show c161ab74f src/test/recovery/t/035_standby_logical_decoding.pl  | git apply -R 20 iterations with 20 tests in parallel performed

Re: cannot abort transaction 2737414167, it was already committed

2024-01-07 Thread Justin Pryzby
On Wed, Dec 27, 2023 at 09:02:25AM -0600, Justin Pryzby wrote: > We had this: > > < 2023-12-25 04:06:20.062 MST telsasoft >ERROR: could not open file > "pg_tblspc/16395/PG_16_202307071/16384/121010871": Input/output error > < 2023-12-25 04:06:20.062 MST telsasoft >STATEMENT: commit > <

Re: warn if GUC set to an invalid shared library

2024-01-07 Thread Justin Pryzby
On Fri, Jul 22, 2022 at 03:26:47PM -0400, Tom Lane wrote: > Hmph. I wonder if we shouldn't change that, because it's a lie. > The value isn't actually coming from the config file, at least > not yet. On Thu, Jul 06, 2023 at 03:15:20PM -0500, Justin Pryzby wrote: > On Sat, Oct 29, 2022 at 10:40

Re: Multidimensional Histograms

2024-01-07 Thread Tomas Vondra
On 1/7/24 11:22, Andrei Lepikhov wrote: > On 7/1/2024 06:54, Tomas Vondra wrote: >> It's an interesting are for experiments, no doubt about it. And if you >> choose to explore it, that's fine. But it's better to be aware it may >> not end with a commit. >> For the multi-dimensional case, I

Re: Multidimensional Histograms

2024-01-07 Thread Andrei Lepikhov
On 7/1/2024 06:54, Tomas Vondra wrote: It's an interesting are for experiments, no doubt about it. And if you choose to explore it, that's fine. But it's better to be aware it may not end with a commit. For the multi-dimensional case, I propose we first try to experiment with the various

Re: Support prepared statement invalidation when result types change

2024-01-07 Thread Shay Rojansky
On Mon, Sep 18, 2023 at 1:31 PM Jelte Fennema-Nio wrote: > Furthermore caching RowDescription is also not super useful, most > clients request it every time because it does not require an extra > round trip, so there's almost no overhead in requesting it. Just to point out, FWIW, that the .NET