Re: Let's make PostgreSQL multi-threaded

2023-06-08 Thread Andrew Dunstan
On 2023-06-07 We 17:58, Andres Freund wrote: Hi, On 2023-06-07 08:53:24 -0400, Robert Haas wrote: Now, Andres is not a man who accepts a tax on performance of any size without a fight, so his "really expensive" might turn out to resemble my "pretty cheap." However, if widespread use of TLS is

Re: [DOCS] alter_foreign_table.sgml typo

2023-06-08 Thread Mehmet Emin KARAKAŞ
Thank you. Fujii Masao , 8 Haz 2023 Per, 14:19 tarihinde şunu yazdı: > > > On 2023/06/08 0:53, Fujii Masao wrote: > > > > > > 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

Re: Use COPY for populating all pgbench tables

2023-06-08 Thread Hannu Krosing
I guess that COPY will still be slower than generating the data server-side ( --init-steps=...G... ) ? What I'd really like to see is providing all the pgbench functions also on the server. Specifically the various random(...) functions - random_exponential(...), random_gaussian(...), random_zipf

Error in calculating length of encoded base64 string

2023-06-08 Thread o . tselebrovskiy
Greetings, everyone! While working on an extension I've found an error in how length of encoded base64 string is calulated; This error is present in 3 files across all supported versions: /src/common/base64.c, function pg_b64_enc_len; /src/backend/utils/adt/encode.c, function pg_base64_enc_le

Re: Return value of pg_promote()

2023-06-08 Thread Ashutosh Sharma
On Wed, Jun 7, 2023 at 9:55 PM Fujii Masao wrote: > > > > 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 sce

Re: [DOCS] alter_foreign_table.sgml typo

2023-06-08 Thread Fujii Masao
On 2023/06/08 0:53, Fujii Masao wrote: 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 op

Re: Git sources doesn't contain the INSATLL file?

2023-06-08 Thread tison
Hi Daniel, As a first-time developer I don't know how the released README / INSTALL are generated. So it's quite unintuitive to find the README.git file. I may expect an entry in README or a BUILD file when I obtain the sources by git clone, while a conventional ./configure && make works so it ma

Re: win32ver data in meson-built postgres.exe

2023-06-08 Thread Magnus Hagander
On Thu, Jun 8, 2023 at 3:45 AM Noah Misch wrote: > > 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-me

Seeking Guidance on Using Valgrind in PostgreSQL for Detecting Memory Leaks in Extension Code

2023-06-08 Thread Pradeep Kumar
Dear Postgres Hackers, I am writing to seek your guidance and utilization of Valgrind in PostgreSQL for detecting memory leaks in extension-related code. Recently, I have been exploring ways to improve the stability and performance of PostgreSQL extensions by addressing memory-related issues, spec

Re: Let's make PostgreSQL multi-threaded

2023-06-08 Thread Tomas Vondra
On 6/8/23 01:37, Thomas Munro wrote: > 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? W

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

2023-06-08 Thread Etsuro Fujita
Hi, On Wed, Jun 7, 2023 at 7:28 PM Nishant Sharma wrote: > 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 bo

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

2023-06-08 Thread Etsuro Fujita
Hi Richard, On Tue, Jun 6, 2023 at 12:20 PM Richard Guo wrote: > On Mon, Jun 5, 2023 at 9:19 PM Etsuro Fujita wrote: >> To avoid this issue, I am wondering if we should modify >> add_paths_to_joinrel() in back branches so that it just disallows the >> FDW to consider pushing down joins when the

Re: running logical replication as the subscription owner

2023-06-08 Thread Amit Kapila
On Thu, Jun 8, 2023 at 6:32 AM Masahiko Sawada wrote: > > 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. Plea

Re: Do we want a hashset type?

2023-06-08 Thread Tomas Vondra
On 6/8/23 11:41, Joel Jacobson wrote: > On Wed, Jun 7, 2023, at 19:37, Tomas Vondra wrote: >> Interesting, considering how dumb the the hash table implementation is. > > That's promising. > Yeah, not bad for sleep-deprived on-plane hacking ... There's a bunch of stuff that needs to be improved

Re: Let's make PostgreSQL multi-threaded

2023-06-08 Thread Hannu Krosing
On Thu, Jun 8, 2023 at 11:54 AM Hannu Krosing wrote: > > On Wed, Jun 7, 2023 at 11:37 PM Andres Freund wrote: > > > > 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 c

Re: Order changes in PG16 since ICU introduction

2023-06-08 Thread Daniel Verite
Jeff Davis wrote: > 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

[btree-indexed column] <@ [range | multirange]

2023-06-08 Thread Joel Jacobson
I've noticed the planner is not yet smart enough to do an index scan when the left operand of a contains operator (<@) is a btree-indexed column and the right operand is a range or multirange type of the same type as the column. For instance, given a users table with an id int primary key column,

Re: Let's make PostgreSQL multi-threaded

2023-06-08 Thread Hannu Krosing
On Thu, Jun 8, 2023 at 12:09 AM Andres Freund wrote: ... > We could e.g. eventually decide that we > don't support parallel query without threading support - which would allow us > to get rid of a very significant amount of code and runtime overhead. Here I was hoping to go in the opposite direc

Re: Let's make PostgreSQL multi-threaded

2023-06-08 Thread Hannu Krosing
I think I remember that in the early days of development somebody did send a patch-set for making PostgreSQL threaded on Solaris. I don't remember why this did not catch on. On Wed, Jun 7, 2023 at 11:40 PM Thomas Kellerer wrote: > > Tomas Vondra schrieb am 07.06.2023 um 21:20: > > Also, which ot

Re: Let's make PostgreSQL multi-threaded

2023-06-08 Thread Hannu Krosing
On Wed, Jun 7, 2023 at 11:37 PM Andres Freund wrote: > > 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

Re: Named Prepared statement problems and possible solutions

2023-06-08 Thread Dave Cramer
Hi Konstantin, Yes, I ran into Euler at pgcon and he mentioned this. I intend to test it. I'd still like to see my proposal in the server. Dave Cramer On Thu, 8 Jun 2023 at 02:15, Konstantin Knizhnik wrote: > > > On 07.06.2023 10:48 PM, Dave Cramer wrote: > > Greetings, > > At pgcon last week

Re: Do we want a hashset type?

2023-06-08 Thread Joel Jacobson
On Wed, Jun 7, 2023, at 19:37, Tomas Vondra wrote: > Interesting, considering how dumb the the hash table implementation is. That's promising. >> I tested Neo4j and the results are surprising; it appears to be >> significantly *slower*. >> However, I've probably misunderstood something, maybe I

Re: Remove WindowClause PARTITION BY items belonging to redundant pathkeys

2023-06-08 Thread Richard Guo
On Thu, Jun 8, 2023 at 7:37 AM David Rowley wrote: > What the attached patch does is process each WindowClause and removes > any items from the PARTITION BY clause that are columns or expressions > relating to redundant PathKeys. > > Effectively, this allows the nodeWindowAgg.c code which stops >

Re: Order changes in PG16 since ICU introduction

2023-06-08 Thread Daniel Verite
Tatsuo Ishii wrote: > >> Yes it's a special case but when doing initdb --locale=C, a user does > >> not need or want an ICU locale. They want the same thing than what v15 > >> does with the same arguments: a template0 database with > >> datlocprovider='c', datcollate='C', datctype='C', dat

[ psql - review request ] review request for \d+ tablename, \d+ indexname indenting

2023-06-08 Thread 쿼리트릭스
Hi, We are Query Tricks. We are a project team created to provide better usability for PostgreSQL DBAs and users. and I'm Hyunhee Ryu, a member of the project team. There is something I would like you to consider introducing in a new version of the release. This is related to \d+ table_name and \d

Re: Partial aggregates pushdown

2023-06-08 Thread Alexander Pyhalov
fujii.y...@df.mitsubishielectric.co.jp писал 2023-06-08 02:08: From: Alexander Pyhalov Sent: Wednesday, June 7, 2023 6:47 PM This seems to be more robust, but the interface became more strange. I'm not sure what to do with it. Some ideas I had to avoid introducing this parameter. Not sure I li

<    1   2