Re: GUC names in messages

2023-11-29 Thread Peter Smith
On Thu, Nov 30, 2023 at 4:59 PM Michael Paquier wrote: > > On Tue, Nov 28, 2023 at 11:54:33AM +1100, Peter Smith wrote: > > Here is patch set v3. > > > > Patches 0001 and 0002 are unchanged from v2. > > After some grepping, I've noticed that 0002 had a mistake with > track_commit_timestamp: some

Re: Testing autovacuum wraparound (including failsafe)

2023-11-29 Thread Masahiko Sawada
On Wed, Nov 29, 2023 at 5:27 AM Masahiko Sawada wrote: > > On Tue, Nov 28, 2023 at 7:16 PM Daniel Gustafsson wrote: > > > > > On 28 Nov 2023, at 03:00, Masahiko Sawada wrote: > > > > > > On Mon, Nov 27, 2023 at 10:40 PM Daniel Gustafsson > > > wrote: > > >> > > >>> On 27 Nov 2023, at 14:06,

RE: Is this a problem in GenericXLogFinish()?

2023-11-29 Thread Hayato Kuroda (Fujitsu)
Dear Alexander, > > Good catch, thank you for reporting! I will investigate more about it and > post my > analysis. > Again, good catch. Here is my analysis and fix patch. I think it is sufficient to add an initialization for writebuf. In the reported case, neither is_prim_bucket_same_wrt nor

[PATCH] plpython function causes server panic

2023-11-29 Thread Hao Zhang
Hi hackers, I found a problem when executing the plpython function: After the plpython function returns an error, in the same session, if we continue to execute plpython function, the server panic will be caused. *Reproduce* preparation SET max_parallel_workers_per_gather=4; SET

Re: Synchronizing slots from primary to standby

2023-11-29 Thread Peter Smith
Here are some review comments for v41-0001. == doc/src/sgml/ref/alter_subscription.sgml 1. + + When altering the + slot_name, + the failover property of the new slot may differ from the + failover + parameter specified in the subscription, you need to adjust the

Re: GUC names in messages

2023-11-29 Thread Michael Paquier
On Thu, Nov 30, 2023 at 03:29:49PM +0900, Kyotaro Horiguchi wrote: > In this patch, the quotation marks cannot be changed from double > quotes. Indeed, that's a good point. I completely forgot about that. -- Michael signature.asc Description: PGP signature

Re: Python installation selection in Meson

2023-11-29 Thread Peter Eisentraut
On 28.11.23 19:16, Andres Freund wrote: On 2023-11-28 19:02:42 +0100, Peter Eisentraut wrote: I noticed that under meson, the selection of the Python installation using the 'PYTHON' option doesn't work completely. The 'PYTHON' option determined the Python binary that will be used to call the

Re: GUC names in messages

2023-11-29 Thread Kyotaro Horiguchi
At Thu, 30 Nov 2023 14:59:21 +0900, Michael Paquier wrote in > > Patch 0003 now uses a "%s%s%s" format specifier with GUC_FORMAT macro > > in guc.c, as recently suggested by Michael [1]. > > I cannot think about a better idea as these strings need to be > translated so they need three %s. In

Re: proposal: possibility to read dumped table's name from file

2023-11-29 Thread Pavel Stehule
Hi čt 30. 11. 2023 v 4:40 odesílatel Tom Lane napsal: > Daniel Gustafsson writes: > > I took another look at this, found some more polish that was needed, > added > > another testcase and ended up pushing it. > > mamba is unhappy because this uses functions without > casting their arguments

Re: GUC names in messages

2023-11-29 Thread Michael Paquier
On Tue, Nov 28, 2023 at 11:54:33AM +1100, Peter Smith wrote: > Here is patch set v3. > > Patches 0001 and 0002 are unchanged from v2. After some grepping, I've noticed that 0002 had a mistake with track_commit_timestamp: some alternate output of modules/commit_ts/ was not updated. meson was

Re: possibility to define only local cursors

2023-11-29 Thread Pavel Stehule
čt 30. 11. 2023 v 6:45 odesílatel Pavel Stehule napsal: > Hi > > one my customer migrated a pretty large application from Oracle, and when > did performance tests, he found very high memory usage related probably to > unclosed cursors. The overhead is significantly bigger than on Oracle >

possibility to define only local cursors

2023-11-29 Thread Pavel Stehule
Hi one my customer migrated a pretty large application from Oracle, and when did performance tests, he found very high memory usage related probably to unclosed cursors. The overhead is significantly bigger than on Oracle (probably Oracle closes cursors after leaving cursor's variable scope, I

Re: Custom explain options

2023-11-29 Thread Andrei Lepikhov
On 21/10/2023 19:16, Konstantin Knizhnik wrote: EXPLAIN statement has a list of options (i.e. ANALYZE, BUFFERS, COST,...) which help to provide useful details of query execution. In Neon we have added PREFETCH option which shows information about page prefetching during query execution

Re: should check collations when creating partitioned index

2023-11-29 Thread Peter Eisentraut
On 23.11.23 11:01, Peter Eisentraut wrote: 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

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

2023-11-29 Thread Peter Eisentraut
On 23.11.23 09:41, Peter Eisentraut wrote: 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); +

Re: Improve rowcount estimate for UNNEST(column)

2023-11-29 Thread jian he
On Mon, Nov 27, 2023 at 3:05 PM jian he wrote: > > Hi. > Since both array_op_test, arrest both are not dropped at the end of > src/test/regress/sql/arrays.sql. > I found using table array_op_test test more convincing. > > select > reltuples * 10 as original, > reltuples * (select

Re: [PoC] Reducing planning time when tables have many partitions

2023-11-29 Thread Yuya Watari
Hello, On Wed, Nov 22, 2023 at 2:32 PM Yuya Watari wrote: > Unfortunately, I've been busy due to work, so I won't be able to > respond for several weeks. I'm really sorry for not being able to see > the patches. As soon as I'm not busy, I will look at them, consider > the above approach, and

Re: [PATCH] Native spinlock support on RISC-V

2023-11-29 Thread Thomas Munro
On Wed, Nov 3, 2021 at 11:55 AM Thomas Munro wrote: > 1. Even though we're using generic built-ins for atomics, I guess we > could still use a src/include/port/atomics/arch-riscv.h file so we > have a place to define PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY when > building for 64 bit. We'd need to

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-11-29 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > Sorry, my analysis was not complete. On looking closely, I think the > reason is that we are allowed to upgrade the slot iff there is no > pending WAL to be processed. Yes, the guard will strongly protect from data loss, but I do not take care in the test. > The test first

Re: Postgres Partitions Limitations (5.11.2.3)

2023-11-29 Thread Shubham Khanna
On Thu, Nov 9, 2023 at 10:00 PM shihao zhong wrote: > > That looks good to me! > > The new status of this patch is: Ready for Committer I have reviewed the patch and it is working fine. Thanks and Regards, Shubham Khanna.

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-29 Thread Tom Lane
Alexander Lakhin writes: > And a warning: > $ CC=gcc-12 CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare > -Wno-clobbered > -Wno-missing-field-initializers" ./configure -q && make -s > slru.c:63:1: warning: ‘inline’ is not at beginning of declaration > [-Wold-style-declaration] >

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-11-29 Thread Amit Kapila
On Thu, Nov 30, 2023 at 8:40 AM Amit Kapila wrote: > > On Wed, Nov 29, 2023 at 2:56 PM Hayato Kuroda (Fujitsu) > wrote: > > > > > > > > > > > > Pushed! > > > > > > > > Hi all, the CF entry for this is marked RfC, and CI is trying to apply > > > > the last patch committed. Is there further work

Re: [PATCH] LockAcquireExtended improvement

2023-11-29 Thread Jingxian Li
Hi Andres, Thanks for your quick reply! On 2023/11/29 0:51, Andres Freund wrote: > Hi, > > On 2023-11-28 20:52:31 +0800, Jingxian Li wrote: >> postgres=*# lock table test in exclusive mode ; >> >> >> T4 >> >> Case 1: >> >> postgres=*# lock table test in share row exclusive mode nowait; >> >>

Re: proposal: possibility to read dumped table's name from file

2023-11-29 Thread Tom Lane
Daniel Gustafsson writes: > I took another look at this, found some more polish that was needed, added > another testcase and ended up pushing it. mamba is unhappy because this uses functions without casting their arguments to unsigned char:

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-11-29 Thread Amit Kapila
On Wed, Nov 29, 2023 at 2:56 PM Hayato Kuroda (Fujitsu) wrote: > > > > > > > > > Pushed! > > > > > > Hi all, the CF entry for this is marked RfC, and CI is trying to apply > > > the last patch committed. Is there further work that needs to be > > > re-attached and/or rebased? > > > > > > > No. I

RE: Is this a problem in GenericXLogFinish()?

2023-11-29 Thread Hayato Kuroda (Fujitsu)
Dear Alexander, > > I've discovered that that patch introduced a code path leading to an > uninitialized memory access. > With the following addition to hash_index.sql: > -- Fill overflow pages by "dead" tuples. > BEGIN; > INSERT INTO hash_cleanup_heap SELECT 1 FROM generate_series(1,

pg_dump/nls.mk is missing a file

2023-11-29 Thread Kyotaro Horiguchi
Hello. Upon reviewing my translation, I discovered that filter.c was not included in the nls.mk of pg_dump. Additional it appears that two '.h' files have been included for a long time, but they seem unnecessary as their removal does not affect the results. The attached patch is intended to

Re: pg_upgrade and logical replication

2023-11-29 Thread Amit Kapila
On Thu, Nov 30, 2023 at 6:37 AM Peter Smith wrote: > > Here are some review comments for patch v20-0001 > > == > > 1. getSubscriptions > > + if (dopt->binary_upgrade && fout->remoteVersion >= 17) > + appendPQExpBufferStr(query, " s.subenabled\n"); > + else > + appendPQExpBufferStr(query,

Re: encoding affects ICU regex character classification

2023-11-29 Thread Thomas Munro
On Thu, Nov 30, 2023 at 1:23 PM Jeff Davis wrote: > Character classification is not localized at all in libc or ICU as far > as I can tell. Really? POSIX isalpha()/isalpha_l() and friends clearly depend on a locale. See eg d522b05c for a case where that broke something. Perhaps you mean glibc

Re: about help message for new pg_dump's --filter option

2023-11-29 Thread Kyotaro Horiguchi
At Thu, 30 Nov 2023 10:20:40 +0900 (JST), Kyotaro Horiguchi wrote in > Hello. > > Recently, a new --filter option was added to pg_dump. I might be > wrong, but the syntax of the help message for this feels off. Is the > word 'on' not necessary after 'based'? > > > --filter=FILENAME

Re: logical decoding and replication of sequences, take 2

2023-11-29 Thread Peter Smith
On Wed, Nov 29, 2023 at 11:45 PM Tomas Vondra wrote: > > > > On 11/27/23 23:06, Peter Smith wrote: > > FWIW, here are some more minor review comments for v20231127-3-0001 > > > > == > > .../replication/logical/reorderbuffer.c > > > > 3. > > + * To decide if a sequence change is

Extra periods in pg_dump messages

2023-11-29 Thread Kyotaro Horiguchi
Sorry for the sequential mails. In the bleeding-edge version of pg_dump, when a conditionspecifying an index, for example, is described in an object filter file, the following message is output. However, there is a period at the end of the line. Shouldn't this be removed? $ pg_dump

Bug in pgbench prepared statements

2023-11-29 Thread Lev Kokotov
Hi, I noticed something that looks like a bug in pgbench when using the prepared protocol. pgbench assumes that all prepared statements are prepared correctly, even if they contain errors (e.g. syntax, column/table doesn't exist, etc.). My test script is just: SELECT one; The output looks

about help message for new pg_dump's --filter option

2023-11-29 Thread Kyotaro Horiguchi
Hello. Recently, a new --filter option was added to pg_dump. I might be wrong, but the syntax of the help message for this feels off. Is the word 'on' not necessary after 'based'? > --filter=FILENAMEinclude or exclude objects and data from dump > based

Re: BackgroundPsql's set_query_timer_restart() may not work

2023-11-29 Thread Masahiko Sawada
On Wed, Nov 29, 2023 at 7:48 PM Bharath Rupireddy wrote: > > On Wed, Nov 29, 2023 at 1:49 PM Masahiko Sawada wrote: > > > > On Wed, Nov 29, 2023 at 4:30 PM Bharath Rupireddy > > wrote: > > > > > > On Tue, Nov 28, 2023 at 12:23 PM Tom Lane wrote: > > > > > > > > Bharath Rupireddy writes: > > >

Re: [Proposal] global sequence implemented by snowflake ID

2023-11-29 Thread Michael Paquier
On Tue, Nov 28, 2023 at 02:23:44PM +0530, Amit Kapila wrote: > It is interesting to see you want to work towards globally distributed > sequences. I think it would be important to discuss how and what we > want to achieve with sequences w.r.t logical replication and or > active-active

Re: pg_upgrade and logical replication

2023-11-29 Thread Peter Smith
On Thu, Nov 30, 2023 at 12:06 PM Peter Smith wrote: > > Here are some review comments for patch v20-0001 > > 3. > +# The subscription's running status should be preserved > +my $result = > + $new_sub->safe_psql('postgres', > + "SELECT subenabled FROM pg_subscription WHERE subname =

Re: pg_upgrade and logical replication

2023-11-29 Thread Peter Smith
Here are some review comments for patch v20-0001 == 1. getSubscriptions + if (dopt->binary_upgrade && fout->remoteVersion >= 17) + appendPQExpBufferStr(query, " s.subenabled\n"); + else + appendPQExpBufferStr(query, " false AS subenabled\n"); Probably I misunderstood this logic...

Re: proposal: change behavior on collation version mismatch

2023-11-29 Thread Jeremy Schneider
On 11/28/23 2:12 AM, Daniel Verite wrote: > Jeremy Schneider wrote: >> 1) "collation changes are uncommon" (which is relatively correct) >> 2) "most users would rather have ease-of-use than 100% safety, since >> it's uncommon" >> >> And I think this led to the current behavior of issuing a

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-29 Thread Tomas Vondra
On 11/29/23 23:59, Matthias van de Meent wrote: > On Wed, 29 Nov 2023 at 21:56, Tomas Vondra > wrote: >> >> On 11/29/23 21:30, Matthias van de Meent wrote: >>> On Wed, 29 Nov 2023 at 18:55, Tomas Vondra >>> wrote: I did try to measure how much it actually saves, but none of the tests I

Re: Streaming I/O, vectored I/O (WIP)

2023-11-29 Thread Thomas Munro
On Thu, Nov 30, 2023 at 12:16 PM Heikki Linnakangas wrote: > On 29/11/2023 21:39, Thomas Munro wrote: > > One thing I wasn't 100% happy with was the treatment of ENOSPC. A few > > callers believe that short writes set errno: they error out with a > > message including %m. We have historically

Re: logical decoding and replication of sequences, take 2

2023-11-29 Thread Tomas Vondra
On 11/29/23 15:41, Tomas Vondra wrote: > ... >> >> One thing that worries me about that approach is that it can suck with >> the workload that has a lot of DDLs that create XLOG_SMGR_CREATE >> records. We have previously fixed some such workloads in logical >> decoding where decoding a transaction

Re: encoding affects ICU regex character classification

2023-11-29 Thread Tom Lane
Jeff Davis writes: > The problem seems to be confusion between pg_wchar and a unicode code > point in pg_wc_isalpha() and related functions. Yeah, that's an ancient sore spot: we don't really know what the representation of wchar is. We assume it's Unicode code points for UTF8 locales, but libc

encoding affects ICU regex character classification

2023-11-29 Thread Jeff Davis
The following query: SELECT U&'\017D' ~ '[[:alpha:]]' collate "en-US-x-icu"; returns true if the server encoding is UTF8, and false if the server encoding is LATIN9. That's a bug -- any behavior involving ICU should be encoding-independent. The problem seems to be confusion between pg_wchar

Re: Streaming I/O, vectored I/O (WIP)

2023-11-29 Thread Heikki Linnakangas
On 29/11/2023 21:39, Thomas Munro wrote: One thing I wasn't 100% happy with was the treatment of ENOSPC. A few callers believe that short writes set errno: they error out with a message including %m. We have historically set errno = ENOSPC inside FileWrite() if the write size was unexpectedly

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-29 Thread Matthias van de Meent
On Wed, 29 Nov 2023 at 21:56, Tomas Vondra wrote: > > On 11/29/23 21:30, Matthias van de Meent wrote: >> On Wed, 29 Nov 2023 at 18:55, Tomas Vondra >> wrote: >>> I did try to measure how much it actually saves, but none of the tests I >>> did actually found measurable improvement. So I'm tempted

Re: [HACKERS] Changing references of password encryption to hashing

2023-11-29 Thread Nathan Bossart
On Wed, Nov 29, 2023 at 04:02:11PM -0500, Robert Haas wrote: > I'd fully support having good documentation that says "hey, here are > the low security authentication configurations, here are the > medium-security ones, here are the high security ones, and here's why > these ones are better than

optimize atomic exchanges

2023-11-29 Thread Nathan Bossart
On Fri, Nov 10, 2023 at 08:55:29PM -0600, Nathan Bossart wrote: > On Fri, Nov 10, 2023 at 06:48:39PM -0800, Andres Freund wrote: >> Yes. We should optimize pg_atomic_exchange_u32() one of these days - it can >> be >> done *far* faster than a cmpxchg. When I was adding the atomic abstraction >>

Re: [HACKERS] Changing references of password encryption to hashing

2023-11-29 Thread Robert Haas
On Wed, Nov 29, 2023 at 2:12 AM Stephen Frost wrote: > I had been hoping you might shed some light on just what use cases you > were referring to so that we could have a constructive discussion about > if ldap is actually a reasonable solution. I even explicitly pointed > out that there may

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-29 Thread Tomas Vondra
On 11/29/23 21:30, Matthias van de Meent wrote: > On Wed, 29 Nov 2023 at 18:55, Tomas Vondra > wrote: >> >> On 11/29/23 15:52, Tomas Vondra wrote: ... This also made me think a bit more about how we're working with the tuples. With your latest patch, we always deserialize and

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-29 Thread Matthias van de Meent
On Wed, 29 Nov 2023 at 18:55, Tomas Vondra wrote: > > On 11/29/23 15:52, Tomas Vondra wrote: > >> ... > >> > >> This also made me think a bit more about how we're working with the > >> tuples. With your latest patch, we always deserialize and re-serialize > >> the sorted brin tuples, just in case

Re: remaining sql/json patches

2023-11-29 Thread Andrew Dunstan
> On Nov 29, 2023, at 2:41 PM, Andres Freund wrote: > > Hi, > >> On 2023-11-29 14:21:59 -0500, Andrew Dunstan wrote: >> On 2023-11-29 We 12:42, Andres Freund wrote: I do have a CFLAGS setting, but for meson I used '-Ddebug=true' and no buildtype or optimization setting. However,

Re: Custom explain options

2023-11-29 Thread Pavel Stehule
Hi so 25. 11. 2023 v 8:23 odesílatel Konstantin Knizhnik napsal: > Hi hackers, > > EXPLAIN statement has a list of options (i.e. ANALYZE, BUFFERS, COST,...) > which help to provide useful details of query execution. > In Neon we have added PREFETCH option which shows information about page >

Re: meson: Stop using deprecated way getting path of files

2023-11-29 Thread Andres Freund
Hi, On 2023-11-29 13:11:23 -0600, Tristan Partin wrote: > This looks good to me. Cool. > What is our limiting factor on bumping the minimum Meson version? Old distro versions, particularly ones where the distro just has an older python. It's one thing to require installing meson but quite

Re: remaining sql/json patches

2023-11-29 Thread Andres Freund
Hi, On 2023-11-29 14:21:59 -0500, Andrew Dunstan wrote: > On 2023-11-29 We 12:42, Andres Freund wrote: > > > I do have a CFLAGS setting, but for meson I used '-Ddebug=true' and no > > > buildtype  or optimization setting. However, I see that in meson.build > > > we're > > > defaulting to

Re: Streaming I/O, vectored I/O (WIP)

2023-11-29 Thread Thomas Munro
On Wed, Nov 29, 2023 at 1:44 AM Heikki Linnakangas wrote: > LGTM. I think this 0001 patch is ready for commit, independently of the > rest of the patches. Done. > In v2-0002-Provide-vectored-variants-of-FileRead-and-FileWri-1.patch, fd.h: > > > +/* Filename components */ > > +#define

Re: Fix some memory leaks in ecpg.addons

2023-11-29 Thread Andres Freund
Hi, On 2023-11-08 22:00:00 +0300, Alexander Lakhin wrote: > Hello Tristan, > > 08.11.2023 20:37, Tristan Partin wrote: > > Are people using some suppression file or setting ASAN_OPTIONS to something? > > > > I use the following: > ASAN_OPTIONS=detect_leaks=0:abort_on_error=1:print_stacktrace=1:\

Re: remaining sql/json patches

2023-11-29 Thread Andrew Dunstan
On 2023-11-29 We 12:42, Andres Freund wrote: Hi, On 2023-11-29 07:37:53 -0500, Andrew Dunstan wrote: On 2023-11-28 Tu 21:10, Andres Freund wrote: Hi, On 2023-11-28 20:58:41 -0500, Andrew Dunstan wrote: On 2023-11-28 Tu 19:32, Tom Lane wrote: Andrew Dunstan writes: So I'm now a bit

Re: Fix some memory leaks in ecpg.addons

2023-11-29 Thread Andres Freund
Hi, On 2023-11-08 11:37:46 -0600, Tristan Partin wrote: > On Wed Nov 8, 2023 at 11:18 AM CST, Michael Meskes wrote: > > Am Mittwoch, dem 08.11.2023 um 12:07 -0500 schrieb Tom Lane: > > > "Tristan Partin" writes: > > > > clang and gcc both now support -fsanitize=address,undefined. These > > > >

Re: meson: Stop using deprecated way getting path of files

2023-11-29 Thread Tristan Partin
This looks good to me. What is our limiting factor on bumping the minimum Meson version? While we are on the topic of Meson, it would be great if you could take a look at this thread[0], where I am trying to compile Postgres with -fsanitize=address,undefined (-Db_sanitize=address,undefined).

Re: Fix assertion in autovacuum worker

2023-11-29 Thread Andres Freund
Hi, On 2023-11-29 11:52:01 -0600, Nathan Bossart wrote: > On Tue, Nov 28, 2023 at 06:48:59PM -0800, Andres Freund wrote: > > On 2023-11-28 20:42:47 -0600, Nathan Bossart wrote: > >> Right. Perhaps we could add a LWLockReleaseAll() to > >> pgstat_shutdown_hook() instead of the autovacuum code,

meson: Stop using deprecated way getting path of files

2023-11-29 Thread Andres Freund
Hi, The just released meson 1.3 strongly deprecated a hack we were using, emitting a noisy warning (the hack basically depended on an implementation detail to work). Turns out there has been a better way available for a while, I just hadn't found it. 1.4 added a more convenient approach, but we

Re: pgsql: meson: docs: Add {html,man} targets, rename install-doc-*

2023-11-29 Thread Andres Freund
Hi, This started at https://www.postgresql.org/message-id/746ba786-85bb-d1f7-b613-57bec35c642a%40dunslane.net but seems worth discussing on -hackers. On 2023-11-29 07:20:59 -0500, Andrew Dunstan wrote: > On 2023-11-28 Tu 21:28, Andres Freund wrote: > > On 2023-11-23 08:32:21 -0500, Andrew

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-29 Thread Tomas Vondra
On 11/29/23 15:52, Tomas Vondra wrote: >> ... >> >> This also made me think a bit more about how we're working with the >> tuples. With your latest patch, we always deserialize and re-serialize >> the sorted brin tuples, just in case the next tuple will also be a >> BRIN tuple of the same page

Re: Fix assertion in autovacuum worker

2023-11-29 Thread Nathan Bossart
On Tue, Nov 28, 2023 at 06:48:59PM -0800, Andres Freund wrote: > On 2023-11-28 20:42:47 -0600, Nathan Bossart wrote: >> Right. Perhaps we could add a LWLockReleaseAll() to >> pgstat_shutdown_hook() instead of the autovacuum code, but I'm afraid that >> is still just a hack. > > Yea, we'd need

Re: psql not responding to SIGINT upon db reconnection

2023-11-29 Thread Tristan Partin
On Thu Nov 23, 2023 at 3:19 AM CST, Heikki Linnakangas wrote: 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

Re: remaining sql/json patches

2023-11-29 Thread Andres Freund
Hi, On 2023-11-29 07:37:53 -0500, Andrew Dunstan wrote: > On 2023-11-28 Tu 21:10, Andres Freund wrote: > > Hi, > > > > On 2023-11-28 20:58:41 -0500, Andrew Dunstan wrote: > > > On 2023-11-28 Tu 19:32, Tom Lane wrote: > > > > Andrew Dunstan writes: > > > > So I'm now a bit baffled. Can you

Re: Whose Cirrus CI credits are used when making a PR to the GitHub mirror?

2023-11-29 Thread Andres Freund
Hi, On 2023-11-29 11:30:25 -0600, Tristan Partin wrote: > I enabled CI on my personal Postgres fork. I then tried to open a PR against > my fork, and since GitHub defaults to creating PRs against upstream, I > accidentally opened a PR against the Postgres mirror, which the > postgres-mirror bot

Whose Cirrus CI credits are used when making a PR to the GitHub mirror?

2023-11-29 Thread Tristan Partin
I enabled CI on my personal Postgres fork. I then tried to open a PR against my fork, and since GitHub defaults to creating PRs against upstream, I accidentally opened a PR against the Postgres mirror, which the postgres-mirror bot then closed, which is good. Stupid me. What the bot didn't do

add AVX2 support to simd.h

2023-11-29 Thread Nathan Bossart
On Wed, Nov 22, 2023 at 12:49:35PM -0600, Nathan Bossart wrote: > On Wed, Nov 22, 2023 at 02:54:13PM +0200, Ants Aasma wrote: >> For reference, executing the page checksum 10M times on a AMD 3900X CPU: >> >> clang-14 -O2 4.292s (17.8 GiB/s) >> clang-14 -O2 -msse4.12.859s

Re: remaining sql/json patches

2023-11-29 Thread Andrew Dunstan
On 2023-11-28 Tu 20:58, Andrew Dunstan wrote: On 2023-11-28 Tu 19:32, Tom Lane wrote: Andrew Dunstan writes: Cool, I took this and ran with it a bit. (See attached) Here are comparative timings for 1000 iterations parsing most of the information_schema.sql, all the way back to 9.3: ...

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-29 Thread Alvaro Herrera
On 2023-Nov-29, Tom Lane wrote: > Kind of odd that, with that mission statement, they are adding > BIO_{get,set}_app_data on the justification that OpenSSL has it > and Postgres is starting to use it. Nonetheless, that commit > also seems to prove the point about lack of API/ABI stability. As I

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-29 Thread Tristan Partin
On Wed Nov 29, 2023 at 10:32 AM CST, Tom Lane wrote: Daniel Gustafsson writes: > On 29 Nov 2023, at 16:21, Tristan Partin wrote: >> Funnily enough, here[0] is BoringSSL adding the BIO_{get,set}_app_data() APIs. > Still doesn't seem like a good candidate for a postgres TLS library since they

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-29 Thread Tom Lane
Daniel Gustafsson writes: > On 29 Nov 2023, at 16:21, Tristan Partin wrote: >> Funnily enough, here[0] is BoringSSL adding the BIO_{get,set}_app_data() >> APIs. > Still doesn't seem like a good candidate for a postgres TLS library since they > themselves claim: >"Although BoringSSL is an

Re: Change GUC hashtable to use simplehash?

2023-11-29 Thread John Naylor
On Wed, Nov 29, 2023 at 9:59 PM Heikki Linnakangas wrote: > > I didn't understand what you meant by the above. Did you wack around > fast-hash, or who did? I turned it into an init/accum/final style (shouldn't affect the result), and took out the input length from the calculation (will affect

Re: proposal: possibility to read dumped table's name from file

2023-11-29 Thread Pavel Stehule
Hi st 29. 11. 2023 v 15:44 odesílatel Daniel Gustafsson napsal: > > On 22 Nov 2023, at 05:27, Erik Rijkers wrote: > > > > Op 11/21/23 om 22:10 schreef Daniel Gustafsson: > >>> On 20 Nov 2023, at 06:20, Pavel Stehule > wrote: > > > >> The attached is pretty close to a committable patch IMO,

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-29 Thread Daniel Gustafsson
> On 29 Nov 2023, at 16:21, Tristan Partin wrote: > > On Tue Nov 28, 2023 at 9:42 AM CST, Tom Lane wrote: >> "Tristan Partin" writes: >> > When you say "this" are you referring to the patch I sent or adding > >> > support for BoringSSL? >> >> I have no interest in supporting BoringSSL. > >

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-29 Thread Tristan Partin
On Tue Nov 28, 2023 at 9:42 AM CST, Tom Lane wrote: "Tristan Partin" writes: > When you say "this" are you referring to the patch I sent or adding > support for BoringSSL? I have no interest in supporting BoringSSL. Funnily enough, here[0] is BoringSSL adding the BIO_{get,set}_app_data()

Re: [PATCHES] Post-special page storage TDE support

2023-11-29 Thread David Christensen
On Tue, Nov 7, 2023 at 6:20 PM Andres Freund wrote: > Hi, > > - IMO the patch touches many places it shouldn't need to touch, because of > essentially renaming a lot of existing macro names to *Limit, > necessitating modifying a lot of users. I think instead the few places > that > care

Re: Is this a problem in GenericXLogFinish()?

2023-11-29 Thread Alexander Lakhin
Hello, 13.11.2023 20:21, Robert Haas wrote: On Mon, Nov 13, 2023 at 12:47 AM Hayato Kuroda (Fujitsu) wrote: Moved. I see that this patch was committed, but I'm not very convinced that the approach is correct. The comment says this: I've discovered that that patch introduced a code path

Re: Change GUC hashtable to use simplehash?

2023-11-29 Thread Heikki Linnakangas
On 29/11/2023 15:31, John Naylor wrote: However, I did find a couple hash functions that are much simpler to adapt to a bytewise interface, pass SMHasher, and are decently fast on short inputs: - fast-hash, MIT licensed, and apparently has some use in software [1] - MX3, CC0 license (looking

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-29 Thread Tomas Vondra
On 11/29/23 15:42, Matthias van de Meent wrote: > On Tue, 28 Nov 2023 at 18:59, Tomas Vondra > wrote: >> >> On 11/28/23 16:39, Matthias van de Meent wrote: >>> On Thu, 23 Nov 2023 at 14:35, Tomas Vondra >>> wrote: On 11/23/23 13:33, Matthias van de Meent wrote: > The union operator may

Re: proposal: possibility to read dumped table's name from file

2023-11-29 Thread Daniel Gustafsson
> On 22 Nov 2023, at 05:27, Erik Rijkers wrote: > > Op 11/21/23 om 22:10 schreef Daniel Gustafsson: >>> On 20 Nov 2023, at 06:20, Pavel Stehule wrote: > >> The attached is pretty close to a committable patch IMO, review is welcome on >> both the patch and commit message. I tried to identify

Re: Parallel CREATE INDEX for BRIN indexes

2023-11-29 Thread Matthias van de Meent
On Tue, 28 Nov 2023 at 18:59, Tomas Vondra wrote: > > On 11/28/23 16:39, Matthias van de Meent wrote: > > On Thu, 23 Nov 2023 at 14:35, Tomas Vondra > > wrote: > >> On 11/23/23 13:33, Matthias van de Meent wrote: > >>> The union operator may leak (lots of) memory, so I think it makes > >>> sense

Re: logical decoding and replication of sequences, take 2

2023-11-29 Thread Tomas Vondra
On 11/29/23 14:42, Amit Kapila wrote: > On Wed, Nov 29, 2023 at 2:59 AM Tomas Vondra > wrote: >> >> I have been hacking on improving the improvements outlined in my >> preceding e-mail, but I have some bad news - I ran into an issue that I >> don't know how to solve :-( >> >> Consider this

Re: Table AM Interface Enhancements

2023-11-29 Thread Pavel Borisov
Hi, Nikita! On Wed, 29 Nov 2023 at 18:27, Nikita Malakhov wrote: > Hi, > > Pavel, as far as I understand Alexander's idea assertion and especially > ereport > here does not make any sense - this method is not considered to report > error, it > silently calls if there is underlying [free]

Re: Table AM Interface Enhancements

2023-11-29 Thread Nikita Malakhov
Hi, Pavel, as far as I understand Alexander's idea assertion and especially ereport here does not make any sense - this method is not considered to report error, it silently calls if there is underlying [free] function and simply falls through otherwise, also, take into account that it could be

Re: trying again to get incremental backup

2023-11-29 Thread Robert Haas
On Wed, Nov 15, 2023 at 9:14 AM Jakub Wartak wrote: > so I've spent some time playing still with patchset v8 (without the > 6/6 testing patch related to wal_level=minimal), with the exception of > - patchset v9 - marked otherwise. Thanks, as usual, for that. > 2. Usability thing: I hit the

Re: Table AM Interface Enhancements

2023-11-29 Thread Pavel Borisov
Hi, Alexander! > I'm planning to review some of the other patches from the current patchset > soon. > I've looked into the patch 0003. The patch looks in good shape and is uncontroversial to me. Making memory structures to be dynamically allocated is simple enough and it allows to store complex

Re: logical decoding and replication of sequences, take 2

2023-11-29 Thread Amit Kapila
On Wed, Nov 29, 2023 at 2:59 AM Tomas Vondra wrote: > > I have been hacking on improving the improvements outlined in my > preceding e-mail, but I have some bad news - I ran into an issue that I > don't know how to solve :-( > > Consider this transaction: > > BEGIN; > ALTER SEQUENCE s RESTART

Re: Python installation selection in Meson

2023-11-29 Thread Peter Eisentraut
On 29.11.23 14:23, Andrew Dunstan wrote: On 2023-11-28 Tu 13:02, Peter Eisentraut wrote: I noticed that under meson, the selection of the Python installation using the 'PYTHON' option doesn't work completely.  The 'PYTHON' option determined the Python binary that will be used to call the

Re: Change GUC hashtable to use simplehash?

2023-11-29 Thread John Naylor
Attached is a rough start with Andres's earlier ideas, to get something concrete out there. I took a look around at other implementations a bit. Many modern hash functions use MUM-style hashing, which typically uses 128-bit arithmetic. Even if they already have an incremental interface and have a

Re: Python installation selection in Meson

2023-11-29 Thread Andrew Dunstan
On 2023-11-28 Tu 13:02, Peter Eisentraut wrote: I noticed that under meson, the selection of the Python installation using the 'PYTHON' option doesn't work completely.  The 'PYTHON' option determined the Python binary that will be used to call the various build support programs.  But it

Re: logical decoding and replication of sequences, take 2

2023-11-29 Thread Tomas Vondra
On 11/27/23 23:06, Peter Smith wrote: > FWIW, here are some more minor review comments for v20231127-3-0001 > > == > doc/src/sgml/logicaldecoding.sgml > > 1. > + The txn parameter contains meta information > about > + the transaction the sequence change is part of. Note however

Re: Extending SMgrRelation lifetimes

2023-11-29 Thread Heikki Linnakangas
I spent some more time digging into this, experimenting with different approaches. Came up with pretty significant changes; see below: On 18/09/2023 18:19, Robert Haas wrote: I think that if you believe 0001 to be correct you should go ahead and commit it sooner rather than later. If you're

Re: remaining sql/json patches

2023-11-29 Thread Andrew Dunstan
On 2023-11-28 Tu 21:10, Andres Freund wrote: Hi, On 2023-11-28 20:58:41 -0500, Andrew Dunstan wrote: On 2023-11-28 Tu 19:32, Tom Lane wrote: Andrew Dunstan writes: So I'm now a bit baffled. Can you provide more color on what your test setup is? *sigh* yes, you're right. I inadvertently

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

2023-11-29 Thread Dilip Kumar
On Wed, Nov 29, 2023 at 3:29 PM Alvaro Herrera wrote: > > On 2023-Nov-29, tender wang wrote: > > > The v8-0001 patch failed to apply in my local repo as below: > > > > git apply v8-0001-Make-all-SLRU-buffer-sizes-configurable.patch > > error: patch failed:

Re: BackgroundPsql's set_query_timer_restart() may not work

2023-11-29 Thread Bharath Rupireddy
On Wed, Nov 29, 2023 at 1:49 PM Masahiko Sawada wrote: > > On Wed, Nov 29, 2023 at 4:30 PM Bharath Rupireddy > wrote: > > > > On Tue, Nov 28, 2023 at 12:23 PM Tom Lane wrote: > > > > > > Bharath Rupireddy writes: > > > > A nitpick on the patch - how about honoring the passed-in parameter > > >

Re: Synchronizing slots from primary to standby

2023-11-29 Thread Drouvot, Bertrand
Hi, On 11/29/23 3:58 AM, Amit Kapila wrote: On Tue, Nov 28, 2023 at 2:17 PM Drouvot, Bertrand wrote: What do you think about also adding a pg_alter_logical_replication_slot() or such function? That would allow users to alter manually created logical replication slots without the need to

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

2023-11-29 Thread Alvaro Herrera
On 2023-Nov-29, tender wang wrote: > The v8-0001 patch failed to apply in my local repo as below: > > git apply v8-0001-Make-all-SLRU-buffer-sizes-configurable.patch > error: patch failed: src/backend/access/transam/multixact.c:1851 > error: src/backend/access/transam/multixact.c: patch does not

  1   2   >