Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Drouvot, Bertrand
Hi, On 6/8/23 12:37 AM, Jeremy Schneider wrote: On 6/7/23 2:39 PM, Thomas Kellerer wrote: Tomas Vondra schrieb am 07.06.2023 um 21:20: I did google search for "oracle threaded_execution" and browsed a bit; didn't see anything that seems earth shattering so far. FWIW, I recall Karl Arao's

Re: Use COPY for populating all pgbench tables

2023-06-07 Thread David Rowley
On Thu, 8 Jun 2023 at 07:16, Tristan Partin wrote: > > master: > > 5000 of 5000 tuples (100%) done (elapsed 260.93 s, remaining 0.00 s)) > vacuuming... > creating primary keys... > done in 1414.26 s (drop tables 0.20 s, create tables 0.82 s, client-side > generate 1280.43 s, vacuum 2.55

Re: is pg_log_standby_snapshot() really needed?

2023-06-07 Thread Jaime Casanova
On Thu, Jun 8, 2023 at 12:12 AM Drouvot, Bertrand wrote: > > a no-activity system at the time the logical replication slot is being > created. > Means at the time the system is "non active" it may be possible that the > checkpoint > would still have a lot to do. > ok, this doesn't deserve that

[PATCH] Add loongarch native checksum implementation.

2023-06-07 Thread YANG Xudong
Hi, This patch tries to add loongarch native crc32 check with crcc.* instructions to postgresql. The patch is tested on my Loongson 3A5000 machine with Loong Arch Linux and GCC 13.1.0 / clang 16.0.0 with - default ./configure - default meson setup See: [1]:

Re: PG 16 draft release notes ready

2023-06-07 Thread Masahiko Sawada
Hi, On Fri, May 19, 2023 at 5:49 AM Bruce Momjian wrote: > > I have completed the first draft of the PG 16 release notes. You can > see the output here: > > https://momjian.us/pgsql_docs/release-16.html > > I will adjust it to the feedback I receive; that URL will quickly show > all

Re: is pg_log_standby_snapshot() really needed?

2023-06-07 Thread Drouvot, Bertrand
Hi, On 6/7/23 8:50 PM, Jaime Casanova wrote: On Wed, Jun 7, 2023 at 5:19 AM Drouvot, Bertrand wrote: Hi, On 6/7/23 7:32 AM, Jaime Casanova wrote: So, I wonder if that function is really needed because as I said I solved it with already existing functionality. Or if it is really needed

Re: Support logical replication of DDLs

2023-06-07 Thread Amit Kapila
On Tue, Jun 6, 2023 at 4:26 PM Amit Kapila wrote: > > > Few assorted comments: > === > Few comments on 0008* patch: == 1. After 0008*, deparse_CreateStmt(), forms dpcontext before forming identity whereas it is required only after it. It may not matter

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

2023-06-07 Thread Hayato Kuroda (Fujitsu)
Dear Vignesh, Thank you for reviewing! PSA new version patch set. > Few minor comments: > 1) we could remove the variable slotname from the below code by using > PQgetvalue directly in pg_log: > + for (i = 0; i < ntups; i++) > + { > + char *slotname; > + > +

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Dilip Kumar
On Thu, Jun 8, 2023 at 3:00 AM Andres Freund wrote: > > Yea, we definitely need the supervisor function in a separate > process. Presumably that means we need to split off some of the postmaster > responsibilities - e.g. I don't think it'd make sense to handle connection > establishment in the

Re: Initial Schema Sync for Logical Replication

2023-06-07 Thread Masahiko Sawada
On Tue, May 23, 2023 at 2:31 PM Amit Kapila wrote: > > On Mon, May 22, 2023 at 6:37 AM Masahiko Sawada wrote: > > > > On Fri, Apr 28, 2023 at 4:16 PM Masahiko Sawada > > wrote: > > > Yes, in this approach, we need to dump/restore objects while > > > specifying with fine granularity. Ideally,

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

2023-06-07 Thread Hayato Kuroda (Fujitsu)
Dear Vignesh, Thank you for reviewing! New version will be attached the next post. > Few comments > 1) check_for_parameter_settings, check_for_confirmed_flush_lsn and > check_are_logical_slots_active functions all have the same messages, > we can keep it unique so that it is easy for user to

Re: Introduce WAIT_EVENT_EXTENSION and WAIT_EVENT_BUFFER_PIN

2023-06-07 Thread Masahiro Ikeda
Hi, On 2023-05-19 16:48, Drouvot, Bertrand wrote: While at it, I think that making use of an enum might also be an open door (need to think more about it) to allow extensions to set their own wait event. Something like RequestNamedLWLockTranche()/GetNamedLWLockTranche() are doing. Currently

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Tatsuo Ishii
>> As I replied in that subthread, that creates a worse problem: if you >> only change the provider when the locale is C, then what about when the >> locale is *not* C? >> >> export LANG=en_US.UTF-8 >> initdb -D data --locale=fr_FR.UTF-8 >> ... >> provider:icu >> ICU locale:

Re: win32ver data in meson-built postgres.exe

2023-06-07 Thread Noah Misch
On Wed, Jun 07, 2023 at 04:47:26PM -0700, Andres Freund wrote: > On 2023-06-07 16:14:07 -0700, Noah Misch wrote: > > A postgres.exe built with meson, ninja, and MSVC lacks the version metadata > > that postgres.exe gets under non-meson build systems. Patch attached. > > I dimly recall that we

Re: Cleaning up nbtree after logical decoding on standby work

2023-06-07 Thread Peter Geoghegan
On Wed, Jun 7, 2023 at 5:12 PM Andres Freund wrote: > -1. For me separating the P_NEW path makes a lot of sense, but isn't 16 > material. I don't agree that it's a problem to have heaprel as a parameter in > a bunch of places that don't strictly need it today. As I've said, this is primarily

Re: running logical replication as the subscription owner

2023-06-07 Thread Masahiko Sawada
On Mon, Jun 5, 2023 at 3:15 AM Amit Kapila wrote: > > On Fri, May 26, 2023 at 6:18 PM Masahiko Sawada wrote: > > > > On Thu, May 25, 2023 at 5:41 PM Amit Kapila wrote: > > > > I've attached the updated patch. Please review it. > > > > Few comments: > 1. > + /* get the owner for ACL and RLS

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Joe Conway
On 6/7/23 19:26, Jeff Davis wrote: * What do we do in the case where the environment has LANG=C.UTF-8 (as some buildfarm members do)? Is an error acceptable in that case? If I understand the discussion so far correctly, I think that case should fall to the provider. If it supports

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Tatsuo Ishii
Hi, > On Wed, 2023-06-07 at 23:50 +0200, Daniel Verite wrote: >> The simplest way to obtain that in v16 is to teach initdb that >> --locale=C without the --locale-provider option implies that >> --locale-provider=libc ([1]) > > As I replied in that subthread, that creates a worse problem: if you

Re: Cleaning up nbtree after logical decoding on standby work

2023-06-07 Thread Andres Freund
Hi, On 2023-06-05 12:04:29 -0700, Peter Geoghegan wrote: > On Sun, May 28, 2023 at 7:49 PM Heikki Linnakangas wrote: > > IMO this makes sense for v16. These new arguments were introduced in > > v16, so if we have second thoughts, now is the right time to change > > them, before v16 is released.

Re: win32ver data in meson-built postgres.exe

2023-06-07 Thread Andres Freund
Hi, On 2023-06-07 16:14:07 -0700, Noah Misch wrote: > A postgres.exe built with meson, ninja, and MSVC lacks the version metadata > that postgres.exe gets under non-meson build systems. Patch attached. I dimly recall that we discussed that and basically decided that it doesn't really make sense

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Thomas Munro
On Thu, Jun 8, 2023 at 10:37 AM Jeremy Schneider wrote: > On 6/7/23 2:39 PM, Thomas Kellerer wrote: > > Tomas Vondra schrieb am 07.06.2023 um 21:20: > >> Also, which other projects did this transition? Is there something we > >> could learn from them? Were they restricted to much smaller list of

Remove WindowClause PARTITION BY items belonging to redundant pathkeys

2023-06-07 Thread David Rowley
Recently Markus Winand pointed out to me that the PG15 changes made in [1] to teach the query planner about monotonic window functions improved the situation for PostgreSQL on his feature/optimization timeline for PostgreSQL. These can be seen in [2]. Unfortunately, if you look at the timeline

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Jeff Davis
On Thu, 2023-06-08 at 00:11 +0200, Peter Eisentraut wrote: > On 05.06.23 19:54, Jeff Davis wrote: > > New patch series attached. > > Could you clarify what here is intended for 16 and what is for later? I apologize about the patch churn here. I implemented several approaches to see what feedback

win32ver data in meson-built postgres.exe

2023-06-07 Thread Noah Misch
A postgres.exe built with meson, ninja, and MSVC lacks the version metadata that postgres.exe gets under non-meson build systems. Patch attached. Author: Noah Misch Commit: Noah Misch Add win32ver data to meson-built postgres.exe. This preserves two quirks of the older

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Jeff Davis
On Wed, 2023-06-07 at 23:50 +0200, Daniel Verite wrote: > The simplest way to obtain that in v16 is to teach initdb that > --locale=C without the --locale-provider option implies that > --locale-provider=libc ([1]) As I replied in that subthread, that creates a worse problem: if you only change

Re: is pg_log_standby_snapshot() really needed?

2023-06-07 Thread Andres Freund
Hi, On 2023-06-07 13:50:30 -0500, Jaime Casanova wrote: > CHECKPOINT could be expensive in a busy system, but the problem > pg_log_standby_snapshot() is solving is about a no-activity system, > and in a no-activity system CHECKPOINT is very fast. There's no easy way for the subscriber to know if

Re: pg_collation.collversion for C.UTF-8

2023-06-07 Thread Jeff Davis
On Wed, 2023-06-07 at 23:28 +0200, Peter Eisentraut wrote: > On 06.06.23 21:23, Jeff Davis wrote: > > What about ICU? How should provider=icu locale=C.UTF-8 behave? We > > could: > > It should be an error. > > > a. Just pass it to the provider and see what happens (older > > versions of > > ICU

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Jeremy Schneider
On 6/7/23 2:39 PM, Thomas Kellerer wrote: > Tomas Vondra schrieb am 07.06.2023 um 21:20: >> Also, which other projects did this transition? Is there something we >> could learn from them? Were they restricted to much smaller list of >> platforms? > > Not open source, but Oracle was historically

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Peter Eisentraut
On 05.06.23 19:54, Jeff Davis wrote: New patch series attached. Could you clarify what here is intended for 16 and what is for later? This patch set keeps expanding and changing in each iteration. There is a PG16 open item linked to this thread * The rules for choosing default ICU locale

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Andres Freund
Hi, On 2023-06-06 16:14:41 -0400, Greg Stark wrote: > I think of processes and threads as fundamentally the same things, > just a slightly different API -- namely that in one memory is by > default unshared and needs to be explicitly shared and in the other > it's default shared and needs to be

Re: v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Noah Misch
On Wed, Jun 07, 2023 at 11:34:09PM +0200, Peter Eisentraut wrote: > On 07.06.23 23:21, Andres Freund wrote: > >On 2023-06-07 11:54:58 -0700, Noah Misch wrote: > >>Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler > >>bug that causes the build to fail with

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Peter Eisentraut
On 05.06.23 19:54, Jeff Davis wrote: New patch series attached. I plan to commit 0001 and 0002 soon, unless there are objections. 0001 causes the "C" and "POSIX" locales to be treated with memcmp/pg_ascii semantics in ICU, just like in libc. We also considered a new "none" provider, but it's

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Andres Freund
Hi, On 2023-06-07 08:53:24 -0400, Robert Haas wrote: > In my mind, the bigger question is how much further than that do you > have to go? I think I remember a previous conversation with Andres > where he opined that thread-local variables are "really expensive" > (and I apologize in advance if

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Daniel Verite
Jeff Davis wrote: > The locale "C" is a special case, documented as a non-locale. So, if > LOCALE/--locale apply to ICU, then either ICU needs to handle locale > "C" in the expected way (v8 patch series); or when we see locale "C" we > need to somehow change the provider into something

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Andres Freund
Hi, On 2023-06-07 23:39:01 +0200, Peter Eisentraut wrote: > On 07.06.23 23:30, Andres Freund wrote: > > Yea, we definitely need the supervisor function in a separate > > process. Presumably that means we need to split off some of the postmaster > > responsibilities - e.g. I don't think it'd make

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Andres Freund
Hi, On 2023-06-05 20:15:56 -0400, Bruce Momjian wrote: > Yes, sorry, critical sections is what I was remembering. My question is > whether all unexpected backend exits should be treated as critical > sections? Yes. People have argued that the process model is more robust. But it turns out that

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Thomas Kellerer
Tomas Vondra schrieb am 07.06.2023 um 21:20: Also, which other projects did this transition? Is there something we could learn from them? Were they restricted to much smaller list of platforms? Firebird did this a while ago if I'm not mistaken. Not open source, but Oracle was historically

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Peter Eisentraut
On 07.06.23 23:30, Andres Freund wrote: Yea, we definitely need the supervisor function in a separate process. Presumably that means we need to split off some of the postmaster responsibilities - e.g. I don't think it'd make sense to handle connection establishment in the supervisor process. I

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Andres Freund
Hi, On 2023-06-05 13:40:13 -0400, Jonathan S. Katz wrote: > 2. While I wouldn't want to necessarily discourage a moonshot effort, I > would ask if developer time could be better spent on tackling some of the > other problems around vertical scalability? Per some PGCon discussions, > there's still

Re: v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Peter Eisentraut
On 07.06.23 23:16, Tom Lane wrote: Noah Misch writes: Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler bug that causes the build to fail with "readfuncs.switch.c(522): fatal error C1026: parser stack overflow, program too complex (compiling source file

Re: v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Peter Eisentraut
On 07.06.23 23:21, Andres Freund wrote: On 2023-06-07 11:54:58 -0700, Noah Misch wrote: Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler bug that causes the build to fail with "readfuncs.switch.c(522): fatal error C1026: parser stack overflow, program too complex

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Andres Freund
Hi, On 2023-06-05 17:51:57 +0300, Heikki Linnakangas wrote: > If there are no major objections, I'm going to update the developer FAQ, > removing the excuses there for why we don't use threads [1]. I think we should do this even if there's no concensus to slowly change to threads. There's

Re: pg_collation.collversion for C.UTF-8

2023-06-07 Thread Peter Eisentraut
On 06.06.23 21:23, Jeff Davis wrote: What about ICU? How should provider=icu locale=C.UTF-8 behave? We could: It should be an error. a. Just pass it to the provider and see what happens (older versions of ICU would interpret it as en-US-u-va-posix; newer versions would give the root locale).

Re: v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Andres Freund
Hi, On 2023-06-07 11:54:58 -0700, Noah Misch wrote: > Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler > bug that causes the build to fail with "readfuncs.switch.c(522): fatal error > C1026: parser stack overflow, program too complex (compiling source file >

Re: v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Tom Lane
Noah Misch writes: > Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler > bug that causes the build to fail with "readfuncs.switch.c(522): fatal error > C1026: parser stack overflow, program too complex (compiling source file > src/backend/nodes/readfuncs.c)". While I

Re: Wrong results from Parallel Hash Full Join

2023-06-07 Thread Melanie Plageman
On Fri, May 19, 2023 at 8:05 PM Tom Lane wrote: > > I noticed that BF animal conchuela has several times fallen over on the > test case added by 558c9d75f: > > diff -U3 > /home/pgbf/buildroot/HEAD/pgsql.build/src/test/regress/expected/join_hash.out >

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Thomas Munro
On Thu, Jun 8, 2023 at 7:20 AM Tomas Vondra wrote: > Is the platform support really there for all platforms we want/intend to > support? I have no problem believing that for modern Linux/BSD systems, > but what about the older stuff we currently support. There is a conversation to be had about

Named Prepared statement problems and possible solutions

2023-06-07 Thread Dave Cramer
Greetings, At pgcon last week I was speaking to some people about the problem we have with connection pools and named prepared statements. For context pgjdbc (and others) use un-named statements and then switch to named statements after using the statement N (default 5) times. In session mode

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Tomas Vondra
On 6/5/23 17:33, Heikki Linnakangas wrote: > On 05/06/2023 11:18, Tom Lane wrote: >> Heikki Linnakangas writes: >>> I spoke with some folks at PGCon about making PostgreSQL multi-threaded, >>> so that the whole server runs in a single process, with multiple >>> threads. It has been discussed

Re: Use COPY for populating all pgbench tables

2023-06-07 Thread Tristan Partin
On Tue May 23, 2023 at 12:33 PM CDT, Tristan Partin wrote: > I wanted to come with benchmarks, but unfortunately I won't have them > until next month. I can follow-up in a future email. I finally got around to benchmarking. master: $ ./build/src/bin/pgbench/pgbench -i -s 500 CONNECTION_STRING

v16 fails to build w/ Visual Studio 2015

2023-06-07 Thread Noah Misch
Visual Studio 2015 version "14.0.25431.01 Update 3" has an apparent compiler bug that causes the build to fail with "readfuncs.switch.c(522): fatal error C1026: parser stack overflow, program too complex (compiling source file src/backend/nodes/readfuncs.c)". While I wouldn't mind revoking

Re: is pg_log_standby_snapshot() really needed?

2023-06-07 Thread Jaime Casanova
On Wed, Jun 7, 2023 at 5:19 AM Drouvot, Bertrand wrote: > > Hi, > > On 6/7/23 7:32 AM, Jaime Casanova wrote: > > > > So, I wonder if that function is really needed because as I said I > > solved it with already existing functionality. Or if it is really > > needed maybe it is a bug that a

Re: Do we want a hashset type?

2023-06-07 Thread Tomas Vondra
On 6/7/23 16:21, Joel Jacobson wrote: > On Tue, Jun 6, 2023, at 13:20, Tomas Vondra wrote: >> it cuts the timing to about 50% on my laptop, so maybe it'll be ~300ms >> on your system. There's a bunch of opportunities for more improvements, >> as the hash table implementation is pretty

Re: is_superuser is not documented

2023-06-07 Thread Joseph Koshakow
On Wed, Jun 7, 2023 at 11:36 AM Fujii Masao wrote: > > > >On 2023/06/07 23:15, Joseph Koshakow wrote: >> I think I may have discovered a reason why is_superuser is >> intentionally undocumented. is_superuser is not updated if a role's >> superuser attribute is changed by another

Re: memory leak in trigger handling (since PG12)

2023-06-07 Thread Tomas Vondra
On 5/25/23 16:41, Tomas Vondra wrote: > ... > > The attached patch does this - I realized we actually have estate in > ExecGetAllUpdatedCols(), so we don't even need a variant with a > different signature. That makes the patch much simpler. > > The question is whether we need the signature

Re: Return value of pg_promote()

2023-06-07 Thread Fujii Masao
On 2023/06/07 2:00, Laurenz Albe wrote: On Tue, 2023-06-06 at 16:35 +0530, Ashutosh Sharma wrote: At present, pg_promote() returns true to the caller on successful promotion of standby, however it returns false in multiple scenarios which includes: 1) The SIGUSR1 signal could not be sent to

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Yura Sokolov
07.06.2023 15:53, Robert Haas wrote: Right now, if you need a bit of additional session-local state, you just declare a variable and you're all set. That's not a perfect system and does cause some problems, but we can't go from there to a system where it's impossible to add session-local state

Re: [DOCS] alter_foreign_table.sgml typo

2023-06-07 Thread Fujii Masao
On 2023/06/07 23:25, Mehmet Emin KARAKAŞ wrote: Fixed typo in SQL. Current: ALTER FOREIGN TABLE myschema.distributors OPTIONS (ADD opt1 'value', SET opt2 'value2', DROP opt3 'value3'); Fixed: ALTER FOREIGN TABLE myschema.distributors OPTIONS (ADD opt1 'value', SET opt2 'value2', DROP

Disk space not released after schema deletion

2023-06-07 Thread Isaac Morland
The usual question is “why did DELETE not release disk space?”, and I understand why that is and something about how to get the space back (VACUUM). I have a database which hosts multiple applications in various schemas and I’m trying to make test/sample data files by starting with a restored

Re: is_superuser is not documented

2023-06-07 Thread Fujii Masao
On 2023/06/07 23:15, Joseph Koshakow wrote: I think I may have discovered a reason why is_superuser is intentionally undocumented. is_superuser is not updated if a role's superuser attribute is changed by another session. Therefore, is_superuser may show you an incorrect stale value. Perhaps

Re: Improve join_search_one_level readibilty (one line change)

2023-06-07 Thread Tristan Partin
On Wed Jun 7, 2023 at 10:05 AM CDT, 謝東霖 wrote: > Peter Eisentraut > > That shows exactly the problem being complained about. > > I apologize for not using the correct MIME type in my previous email > to the pg-hackers mailing list. Upon sending the first email, I > realized that my patch was

Re: pg_collation.collversion for C.UTF-8

2023-06-07 Thread Daniel Verite
I wrote: > Consider matching '\d' in a regexp. With C.UTF-8 (glibc-2.35), we > only match ASCII characters 0-9, or 10 codepoints. With > "en-US-u-va-posix-x-icu" we match 660 codepoints comprising all the > digit characters in all languages, plus a bunch of variants for > mathematical

Re: Improve join_search_one_level readibilty (one line change)

2023-06-07 Thread 謝東霖
Peter Eisentraut > That shows exactly the problem being complained about. I apologize for not using the correct MIME type in my previous email to the pg-hackers mailing list. Upon sending the first email, I realized that my patch was labeled as "application/x-patch" instead of "text/x-patch."

Re: Order changes in PG16 since ICU introduction

2023-06-07 Thread Peter Eisentraut
On 22.05.23 19:35, Jeff Davis wrote: On Thu, 2023-05-11 at 13:07 +0200, Peter Eisentraut wrote: Here is my proposed patch for this. The commit message makes it sound like lc_collate/ctype are completely obsolete, and I don't think that's quite right: they still represent the server

Fix last unitialized memory warning

2023-06-07 Thread Tristan Partin
This patch is really not necessary from a functional point of view. It is only necessary if we want to silence a compiler warning. Tested on `gcc (GCC) 13.1.1 20230511 (Red Hat 13.1.1-2)`. After silencing this warning, all I am left with (given my build configuration) is: [1667/2280] Compiling

[DOCS] alter_foreign_table.sgml typo

2023-06-07 Thread Mehmet Emin KARAKAŞ
Fixed typo in SQL. Current: ALTER FOREIGN TABLE myschema.distributors OPTIONS (ADD opt1 'value', SET opt2 'value2', DROP opt3 'value3'); Fixed: ALTER FOREIGN TABLE myschema.distributors OPTIONS (ADD opt1 'value', SET opt2 'value2', DROP opt3); Drop options do not get a value. -- MEHMET EMİN

Re: Do we want a hashset type?

2023-06-07 Thread Joel Jacobson
On Tue, Jun 6, 2023, at 13:20, Tomas Vondra wrote: > it cuts the timing to about 50% on my laptop, so maybe it'll be ~300ms > on your system. There's a bunch of opportunities for more improvements, > as the hash table implementation is pretty naive/silly, the on-disk > format is wasteful and so

Re: is_superuser is not documented

2023-06-07 Thread Joseph Koshakow
I think I may have discovered a reason why is_superuser is intentionally undocumented. is_superuser is not updated if a role's superuser attribute is changed by another session. Therefore, is_superuser may show you an incorrect stale value. Perhaps this can be fixed with a show_hook? Otherwise

Re: pg_collation.collversion for C.UTF-8

2023-06-07 Thread Daniel Verite
Jeff Davis wrote: > What about ICU? How should provider=icu locale=C.UTF-8 behave? We > could: > > a. Just pass it to the provider and see what happens (older versions of > ICU would interpret it as en-US-u-va-posix; newer versions would give > the root locale). > > b. Consistently

Re: Improve join_search_one_level readibilty (one line change)

2023-06-07 Thread Peter Eisentraut
On 04.06.23 08:02, Julien Rouhaud wrote: Additionally, if anyone has any tips on ensuring that Gmail recognizes my attached patches as the "text/x-patch" MIME type when sending them from the Chrome client, I would be grateful for the advice. I don't see any problem with the attachment. You can

Re: could not extend file "base/5/3501" with FileFallocate(): Interrupted system call

2023-06-07 Thread Christoph Berg
Re: Alvaro Herrera > > Christoph, could you verify this fixes your issue? > > So, is anyone making progress on this? I don't see anything in the > thread. Well, I had reported that I haven't been seeing any problems since I applied the patch to the postgresql-16.deb package. So for me, the

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Ashutosh Bapat
On Mon, Jun 5, 2023 at 8:22 PM Heikki Linnakangas wrote: > > I spoke with some folks at PGCon about making PostgreSQL multi-threaded, > so that the whole server runs in a single process, with multiple > threads. It has been discussed many times in the past, last thread on > pgsql-hackers was back

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Robert Haas
On Tue, Jun 6, 2023 at 10:02 PM Tom Lane wrote: > I agree that if we were building this system from scratch today, > we'd probably choose thread-per-session not process-per-session. > But the costs of getting to that from where we are will be enormous. > I seriously doubt that the net benefits

Re: Let's make PostgreSQL multi-threaded

2023-06-07 Thread Joe Conway
On 6/6/23 22:02, Tom Lane wrote: (and, I predict, more than one security-grade bug). *That* is what worries me the most I agree that if we were building this system from scratch today, we'd probably choose thread-per-session not process-per-session. But the costs of getting to that from

Re: Inconsistent results with libc sorting on Windows

2023-06-07 Thread Joe Conway
On 6/7/23 07:58, Daniel Verite wrote: Thomas Munro wrote: > > Also, it does not occur at all if parallel scan is disabled. > > Could this be a clue that it is failing to be transitive? That vaguely rang a bell for me... and then I remembered this thread:

Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639)

2023-06-07 Thread Tomas Vondra
On 6/7/23 07:18, Amit Kapila wrote: > On Wed, Jun 7, 2023 at 6:18 AM Tomas Vondra > wrote: >> >> On 6/6/23 17:42, Tomas Vondra wrote: >>> >> >> In investigated this a bit more, and the problem actually seems to be >> more like this: >> >> 1) we create a new logical replication slot >> >> 2)

Re: Inconsistent results with libc sorting on Windows

2023-06-07 Thread Daniel Verite
Thomas Munro wrote: > > > Also, it does not occur at all if parallel scan is disabled. > > > > Could this be a clue that it is failing to be transitive? > > That vaguely rang a bell for me... and then I remembered this thread: > >

Re: postgres_fdw: wrong results with self join + enable_nestloop off

2023-06-07 Thread Nishant Sharma
Hi, Etsuro's patch is also showing the correct output for "set enable_nestloop=off". Looks good to me for back branches due to backport issues. But below are a few observations for the same:- 1) I looked into the query plan for both "set enable_nestloop" on & off case and observe that they are

Re: is pg_log_standby_snapshot() really needed?

2023-06-07 Thread Drouvot, Bertrand
Hi, On 6/7/23 7:32 AM, Jaime Casanova wrote: Hi, I'm testing the ability to have a logical replica subscribed from a standby. Of course, I'm doing this in a laboratory with no activity so everything get stuck after creating the subscription (the main slot). This is clearly because every time

Re: Partial aggregates pushdown

2023-06-07 Thread Alexander Pyhalov
fujii.y...@df.mitsubishielectric.co.jp писал 2023-06-06 15:31: Thanks for the explanation. I understand that the method of comparing two function name strings is incorrect. Instead, I added the parameter isaggpartialfunc indicating whether the aggregate function and its aggpartialfunc are the

Re: Remove incidental md5() function uses from several tests

2023-06-07 Thread Daniel Gustafsson
> On 7 Jun 2023, at 08:59, Peter Eisentraut wrote: > > Continuing the work started with 208bf364a9, this patch removes md5() > function calls from these test suites: > > - bloom > - test_decoding > - isolation > - recovery > - subscription > > This covers all remaining test suites where md5()

Re: Importing pg_bsd_indent into our source tree

2023-06-07 Thread Alexander Lakhin
Hello, I've discovered that the pg_bsd_indent test added here makes an ASAN-instrumented build fail on: ASAN_OPTIONS=detect_leaks=0:strict_string_checks=1 make check-world as follows: # +++ tap check in src/tools/pg_bsd_indent +++ t/001_pg_bsd_indent.pl .. 1/? #   Failed test 'pg_bsd_indent

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread Julien Rouhaud
On Wed, Jun 07, 2023 at 03:42:25PM +0800, jiye wrote: > we will update all commits with latest version certaintly, but we must > confirm that this issue is same with it currently we can not confirm this > issue can be fixed by revert 2aa6e331ead7f3ad080561495ad4bd3bc7cd8913 this > commit, so i

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread jiye
we will update all commits with latest version certaintly, but we must confirm that this issue is same with it currently we can not confirm this issue can be fixed by revert 2aa6e331ead7f3ad080561495ad4bd3bc7cd8913 this commit, so i just query about how this commit can trigger autovacuum lock

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread Julien Rouhaud
On Wed, Jun 07, 2023 at 03:12:44PM +0800, jiye wrote: > actually out test instance include 2aa6e331ead7f3ad080561495ad4bd3bc7cd8913 > this commit, not yet reverted this commit. Are you saying that you're doing tests relying on a version that's missing about 3 years of security and bug fixes?

回复:回复:Fix missing initialization of delayChkptEnd

2023-06-07 Thread 蔡梦娟(玊于)
In my new patch for pg14, I add the assertion on delayChkptEnd in ProcArrayClearTransaction, and also add patches for release branch from 10 to 13, please check. Thanks & Best Regard -- 发件人:Kyotaro Horiguchi 发送时间:2023年6月6日(星期二)

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread jiye
actually out test instance include 2aa6e331ead7f3ad080561495ad4bd3bc7cd8913 this commit, not yet reverted this commit. | | jiye | | jiye...@126.com | Replied Message | From | Julien Rouhaud | | Date | 6/7/2023 14:00 | | To | Robert Haas | | Cc | jiye , t...@sss.pgh.pa.us ,

Remove incidental md5() function uses from several tests

2023-06-07 Thread Peter Eisentraut
Continuing the work started with 208bf364a9, this patch removes md5() function calls from these test suites: - bloom - test_decoding - isolation - recovery - subscription This covers all remaining test suites where md5() calls were just used to generate some random data and can be replaced by

Re: Reload configuration more frequently in apply worker.

2023-06-07 Thread Amit Kapila
On Tue, Jun 6, 2023 at 7:45 AM Zhijie Hou (Fujitsu) wrote: > > On Monday, June 5, 2023 8:03 AM Amit Kapila wrote: > > > > > > I am able to reproduce the problem with the script and steps mentioned by > > you. The patch provided by you fixes the problem and looks good to me. I'll > > push this by

Re: confusion about this commit "Revert "Skip redundant anti-wraparound vacuums""

2023-06-07 Thread Julien Rouhaud
On Tue, Jun 06, 2023 at 03:30:02PM -0400, Robert Haas wrote: > On Mon, Jun 5, 2023 at 1:50 AM jiye wrote: > > > we can not get determinate test case as this issue reproduce only once, > > and currently autovaccum can works as we using vacuum freeze for each > > tables of each database. > > > >