Re: Should rolpassword be toastable?

2024-09-19 Thread Tom Lane
Nathan Bossart writes: > Oh, actually, I see that we are already validating the hash, but you can > create valid SCRAM-SHA-256 hashes that are really long. So putting an > arbitrary limit (patch attached) is probably the correct path forward. I'd > also remove pg_authid's TOAST table while at it

Re: Pgoutput not capturing the generated columns

2024-09-19 Thread Peter Smith
On Fri, Sep 20, 2024 at 3:26 AM Masahiko Sawada wrote: > > On Thu, Sep 19, 2024 at 2:32 AM Amit Kapila wrote: > > ... > > I think that the column list should take priority and we should > > publish the generated column if it is mentioned in irrespective of > > the option. > > Agreed. > > > ... >

Re: ANALYZE ONLY

2024-09-19 Thread Michael Harris
Thanks for the feedback, and sorry it has taken a few days to respond. On Mon, 16 Sept 2024 at 12:29, jian he wrote: > in https://www.postgresql.org/docs/current/ddl-inherit.html > <<< > Commands that do database maintenance and tuning (e.g., REINDEX, > VACUUM) typically only work on individual,

Re: not null constraints, again

2024-09-19 Thread Tender Wang
By the way, the v3 failed applying on Head(d35e293878) git am v3-0001-Catalog-not-null-constraints.patch Applying: Catalog not-null constraints error: patch failed: doc/src/sgml/ref/create_table.sgml:77 error: doc/src/sgml/ref/create_table.sgml: patch does not apply error: patch failed: src/backen

Re: Use streaming read API in ANALYZE

2024-09-19 Thread Mats Kindahl
On Wed, Sep 18, 2024 at 5:13 AM Thomas Munro wrote: > On Sun, Sep 15, 2024 at 12:14 AM Mats Kindahl wrote: > > I used the combination of your patch and making the computation of > vacattrstats for a relation available through the API and managed to > implement something that I think does the rig

Re: Should rolpassword be toastable?

2024-09-19 Thread Nathan Bossart
On Thu, Sep 19, 2024 at 12:44:32PM -0500, Nathan Bossart wrote: > On Thu, Sep 19, 2024 at 10:31:15AM -0400, Tom Lane wrote: >> We could put an arbitrary limit (say, half of BLCKSZ) on the length of >> passwords. > > Something like that could be good enough. I was thinking about actually > validat

Re: attndims, typndims still not enforced, but make the value within a sane threshold

2024-09-19 Thread jian he
On Wed, Sep 18, 2024 at 10:35 PM jian he wrote: > > > The last time this was discussed, I think the conclusion was > > we should remove attndims and typndims entirely on the grounds > > that they're useless. I certainly don't see a point in adding > > more logic that could give the misleading imp

Re: Add on_error and log_verbosity options to file_fdw

2024-09-19 Thread Fujii Masao
On 2024/09/19 23:16, torikoshia wrote: -   COPY_LOG_VERBOSITY_DEFAULT = 0, /* logs no additional messages, default */ -   COPY_LOG_VERBOSITY_VERBOSE, /* logs additional messages */ +   COPY_LOG_VERBOSITY_SILENT = -1, /* logs none */ +   COPY_LOG_VERBOSITY_DEFAULT = 0, /* logs

Re: Using per-transaction memory contexts for storing decoded tuples

2024-09-19 Thread Amit Kapila
On Thu, Sep 19, 2024 at 10:33 PM Masahiko Sawada wrote: > > On Wed, Sep 18, 2024 at 8:55 PM Amit Kapila wrote: > > > > On Thu, Sep 19, 2024 at 6:46 AM David Rowley wrote: > > > > > > On Thu, 19 Sept 2024 at 11:54, Masahiko Sawada > > > wrote: > > > > I've done some benchmark tests for three di

Re: Using per-transaction memory contexts for storing decoded tuples

2024-09-19 Thread Amit Kapila
On Fri, Sep 20, 2024 at 5:13 AM David Rowley wrote: > > On Fri, 20 Sept 2024 at 05:03, Masahiko Sawada wrote: > > I've done other benchmarking tests while changing the memory block > > sizes from 8kB to 8MB. I measured the execution time of logical > > decoding of one transaction that inserted 10

Re: Conflict Detection and Resolution

2024-09-19 Thread Nisha Moond
On Fri, Sep 20, 2024 at 8:40 AM Nisha Moond wrote: > > On Wed, Sep 18, 2024 at 10:46 AM vignesh C wrote: > > > > On Thu, 12 Sept 2024 at 14:03, Ajin Cherian wrote: > > > > > > On Tue, Sep 3, 2024 at 7:42 PM vignesh C wrote: > > > > > > On Fri, 30 Aug 2024 at 11:01, Nisha Moond > > > wrote

Re: Robocopy might be not robust enough for never-ending testing on Windows

2024-09-19 Thread Thomas Munro
On Tue, Sep 17, 2024 at 5:00 PM Alexander Lakhin wrote: > but finding a Windows expert who perhaps can look at the > robocopy's sources, would be good too (and more productive). number_of_kernel_bugs_found_by_pgsql_hackers++; I am reliably informed that a kernel bug fix is in the pipeline and sh

Re: Should rolpassword be toastable?

2024-09-19 Thread Michael Paquier
On Thu, Sep 19, 2024 at 09:46:00PM -0500, Nathan Bossart wrote: > On Thu, Sep 19, 2024 at 07:37:55PM -0400, Jonathan S. Katz wrote: >>> Shouldn't we enforce the limit in every case in encrypt_password, >>> not just this one? (I do agree that encrypt_password is an okay >>> place to enforce it.) >

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2024-09-19 Thread Peter Geoghegan
On Mon, Sep 16, 2024 at 6:05 PM Tomas Vondra wrote: > For example, one of the slowed down queries is query 702 (top of page 8 > in the PDF). The query is pretty simple: > > explain (analyze, timing off, buffers off) > select id1,id2 from t_100_1000_1_2 >where NOT (id1 in (:list)) AND (

Re: Should rolpassword be toastable?

2024-09-19 Thread Nathan Bossart
On Thu, Sep 19, 2024 at 07:37:55PM -0400, Jonathan S. Katz wrote: > On 9/19/24 6:14 PM, Tom Lane wrote: >> Nathan Bossart writes: >> > Oh, actually, I see that we are already validating the hash, but you can >> > create valid SCRAM-SHA-256 hashes that are really long. > > You _can_, but it's up t

RE: Conflict detection for update_deleted in logical replication

2024-09-19 Thread Zhijie Hou (Fujitsu)
> -Original Message- > From: Masahiko Sawada > Sent: Friday, September 20, 2024 2:49 AM > To: Amit Kapila > Cc: shveta malik ; Hou, Zhijie/侯 志杰 > ; pgsql-hackers > Subject: Re: Conflict detection for update_deleted in logical replication > > On Tue, Sep 17, 2024 at 9:29 PM Amit Kapila

RE: [Proposal] Add foreign-server health checks infrastructure

2024-09-19 Thread Hayato Kuroda (Fujitsu)
Dear members, (This mail is just a wrap-up) I found that the final patch was pushed 2 days ago [1] and BF animals say OK for now. Therefore, I've closed the CF entry as "committed". We can extend the feature to other platforms, but I think it could be at another thread later. Thanks everyone for

Re: Partitioned tables and [un]loggedness

2024-09-19 Thread Nathan Bossart
On Thu, Sep 19, 2024 at 10:03:09AM +0200, Alvaro Herrera wrote: > It looks to me like these cases could be modified to accept only > ATT_PARTITIONED_TABLE, not ATT_TABLE anymore. The ATT_TABLE cases are > useless anyway, because they're rejected by transformPartitionCmd. +1. If anything, this ma

Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bind

2024-09-19 Thread Michael Paquier
On Thu, Sep 19, 2024 at 10:53:07AM +0200, Jelte Fennema-Nio wrote: > Seems like a good idea to add a simple test for that behaviour then. > See attached. Thanks. The same can be said for \bind_named, so I have added something for both \bind and \bind_named. -- Michael signature.asc Description:

Re: Conflict Detection and Resolution

2024-09-19 Thread Ajin Cherian
On Fri, Sep 13, 2024 at 10:20 PM vignesh C wrote: > > Few comments: > 1) Tab completion missing for: > a) ALTER SUBSCRIPTION name CONFLICT RESOLVER > b) ALTER SUBSCRIPTION name RESET CONFLICT RESOLVER ALL > c) ALTER SUBSCRIPTION name RESET CONFLICT RESOLVER FOR > > Added. > 2) Documentation mis

Re: attndims, typndims still not enforced, but make the value within a sane threshold

2024-09-19 Thread Tom Lane
Michael Paquier writes: > On Fri, Sep 20, 2024 at 11:51:49AM +0800, Junwang Zhao wrote: >> Should you also bump the catalog version? > No need to worry about that when sending a patch because committers > take care of that when merging a patch into the tree. Doing that in > each patch submitted

Re: Pgoutput not capturing the generated columns

2024-09-19 Thread Amit Kapila
On Thu, Sep 19, 2024 at 10:56 PM Masahiko Sawada wrote: > > > Given that we publish the generated columns if they are mentioned in > the column list, can we separate the patch into two if it helps > reviews? One is to allow logical replication to publish generated > columns if they are explicitly

Re: attndims, typndims still not enforced, but make the value within a sane threshold

2024-09-19 Thread Michael Paquier
On Fri, Sep 20, 2024 at 11:51:49AM +0800, Junwang Zhao wrote: > Should you also bump the catalog version? No need to worry about that when sending a patch because committers take care of that when merging a patch into the tree. Doing that in each patch submitted just creates more conflicts and wo

Re: Custom connstr in background_psql()

2024-09-19 Thread Michael Paquier
On Thu, Sep 19, 2024 at 04:00:30PM +0300, a.ima...@postgrespro.ru wrote: > Should I register the proposal in CF? > Which one to choose if so? I think that's useful, so I'll just go apply it. -- Michael signature.asc Description: PGP signature

Re: not null constraints, again

2024-09-19 Thread jian he
another bug. I will dig later, just want to share it first. minimum producer: drop table if exists pp1,cc1, cc2,cc3; create table pp1 (f1 int ); create table cc1 () inherits (pp1); create table cc2() inherits(pp1,cc1); create table cc3() inherits(pp1,cc1,cc2); alter table pp1 alter f1 set not nul

Re: attndims, typndims still not enforced, but make the value within a sane threshold

2024-09-19 Thread Junwang Zhao
On Fri, Sep 20, 2024 at 10:11 AM jian he wrote: > > On Wed, Sep 18, 2024 at 10:35 PM jian he wrote: > > > > > The last time this was discussed, I think the conclusion was > > > we should remove attndims and typndims entirely on the grounds > > > that they're useless. I certainly don't see a poin

Re: per backend I/O statistics

2024-09-19 Thread Michael Paquier
On Wed, Sep 04, 2024 at 04:45:24AM +, Bertrand Drouvot wrote: > On Tue, Sep 03, 2024 at 04:07:58PM +0900, Kyotaro Horiguchi wrote: >> As an additional benefit of this approach, the client can set a >> connection variable, for example, no_backend_iostats to true, or set >> its inverse variable t

RE: Conflict detection for update_deleted in logical replication

2024-09-19 Thread Zhijie Hou (Fujitsu)
On Friday, September 20, 2024 10:55 AM Zhijie Hou (Fujitsu) wrote: > On Friday, September 20, 2024 2:49 AM Masahiko Sawada > wrote: > > > > > > I think that such a time-based configuration parameter would be a > > reasonable solution. The current concerns are that it might affect > > vacuum pe

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-09-19 Thread Alexander Lakhin
Hello Nathan, 19.09.2024 21:36, Nathan Bossart wrote: On Thu, Sep 19, 2024 at 12:00:00PM +0300, Alexander Lakhin wrote: completed with: DROP INDEX CONCURRENTLY def_vec_quantizer_idx; triggers an assertion failure: TRAP: failed Assert("HaveRegisteredOrActiveSnapshot()"), File: "toast_internals

Re: Conflict Detection and Resolution

2024-09-19 Thread Nisha Moond
On Fri, Sep 20, 2024 at 8:40 AM Nisha Moond wrote: > > On Wed, Sep 18, 2024 at 10:46 AM vignesh C wrote: > > > > On Thu, 12 Sept 2024 at 14:03, Ajin Cherian wrote: > > > > > > On Tue, Sep 3, 2024 at 7:42 PM vignesh C wrote: > > > > > > On Fri, 30 Aug 2024 at 11:01, Nisha Moond > > > wrote

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-09-19 Thread Michael Paquier
On Thu, Sep 19, 2024 at 01:36:36PM -0500, Nathan Bossart wrote: > + PushActiveSnapshot(GetTransactionSnapshot()); > > /* >* Now we must wait until no running transaction could be using > the > @@ -2283,8 +2284,10 @@ index_drop(Oid indexId, bool concurren

Re: Should rolpassword be toastable?

2024-09-19 Thread Jonathan S. Katz
On 9/19/24 6:14 PM, Tom Lane wrote: Nathan Bossart writes: Oh, actually, I see that we are already validating the hash, but you can create valid SCRAM-SHA-256 hashes that are really long. You _can_, but it's up to a driver or a very determined user to do this, as it involves creating a very

Rethinking parallel-scan relation identity checks

2024-09-19 Thread Tom Lane
In [1] I whined about how the parallel heap scan machinery should have noticed that the same ParallelTableScanDesc was being used to give out block numbers for two different relations. Looking closer, there are Asserts that mean to catch this type of error --- but they are comparing relation OIDs,

Re: Using per-transaction memory contexts for storing decoded tuples

2024-09-19 Thread David Rowley
On Fri, 20 Sept 2024 at 05:03, Masahiko Sawada wrote: > I've done other benchmarking tests while changing the memory block > sizes from 8kB to 8MB. I measured the execution time of logical > decoding of one transaction that inserted 10M rows. I set > logical_decoding_work_mem large enough to avoid

Re: not null constraints, again

2024-09-19 Thread Tender Wang
jian he 于2024年9月20日周五 11:34写道: > another bug. > I will dig later, just want to share it first. > > minimum producer: > drop table if exists pp1,cc1, cc2,cc3; > create table pp1 (f1 int ); > create table cc1 () inherits (pp1); > create table cc2() inherits(pp1,cc1); > create table cc3() inherits(p

Re: Pgoutput not capturing the generated columns

2024-09-19 Thread Amit Kapila
On Fri, Sep 20, 2024 at 4:16 AM Peter Smith wrote: > > On Fri, Sep 20, 2024 at 3:26 AM Masahiko Sawada wrote: > > > > On Thu, Sep 19, 2024 at 2:32 AM Amit Kapila wrote: > > > > > > > > > Users can use a publication like "create publication pub1 for table > > > t1(c1, c2), t2;" where they want t1

Re: per backend I/O statistics

2024-09-19 Thread Michael Paquier
On Tue, Sep 17, 2024 at 01:56:34PM +, Bertrand Drouvot wrote: > No problem at all! (I re-explained because I'm not always 100% sure that my > explanations are crystal clear ;-) ) We've discussed a bit this patch offline, but after studying the patch I doubt that this part is a good idea: +

Re: BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION

2024-09-19 Thread Tom Lane
I wrote: > Justin Pryzby writes: >> This commit seems to trigger elog(), not reproducible in the >> parent commit. >> 6e086fa2e77 Allow parallel workers to cope with a newly-created session user >> ID. >> postgres=# SET min_parallel_table_scan_size=0; CLUSTER pg_attribute USING >> pg_attribute_

Re: Partitioned tables and [un]loggedness

2024-09-19 Thread Michael Paquier
On Thu, Sep 19, 2024 at 10:03:09AM +0200, Alvaro Herrera wrote: > It looks to me like these cases could be modified to accept only > ATT_PARTITIONED_TABLE, not ATT_TABLE anymore. The ATT_TABLE cases are > useless anyway, because they're rejected by transformPartitionCmd. Makes sense to me, thanks

Re: Conflict Detection and Resolution

2024-09-19 Thread shveta malik
On Thu, Sep 19, 2024 at 5:43 PM vignesh C wrote: > > > > > I was reviewing the CONFLICT RESOLVER (insert_exists='apply_remote') > and found that one conflict remains unresolved in the following > scenario: Thanks for the review and testing. > Pub: > CREATE TABLE circles(c1 CIRCLE, c2 text, EXCLU

Re: Add contrib/pg_logicalsnapinspect

2024-09-19 Thread Bertrand Drouvot
Hi, On Thu, Sep 19, 2024 at 10:08:19AM +1000, Peter Smith wrote: > Thanks for the updated patch. > > == > .../expected/logical_inspect.out > > 2 > +step s1_get_logical_snapshot_info: SELECT > (pg_get_logical_snapshot_info(f.name::pg_lsn)).state,(pg_get_logical_snapshot_info(f.name::pg_lsn)).

Re: Conflict Detection and Resolution

2024-09-19 Thread vignesh C
On Thu, 12 Sept 2024 at 14:03, Ajin Cherian wrote: > > On Tue, Sep 3, 2024 at 7:42 PM vignesh C wrote: > > On Fri, 30 Aug 2024 at 11:01, Nisha Moond > wrote: > > > > Here is the v11 patch-set. Changes are: > I was reviewing the CONFLICT RESOLVER (insert_exists='apply_remote') and f

Re: Memory consumed by paths during partitionwise join planning

2024-09-19 Thread Andrei Lepikhov
On 19/9/2024 13:12, Ashutosh Bapat wrote: On Thu, Sep 19, 2024 at 4:18 PM Andrei Lepikhov wrote: At the same time, this technique (while highly useful in general) adds fragility and increases complexity: a developer needs to remember to link the path using the pointer in different places of the

Re: pgsql: Don't enter parallel mode when holding interrupts.

2024-09-19 Thread Robert Haas
On Wed, Sep 18, 2024 at 3:27 AM Laurenz Albe wrote: > On Wed, 2024-09-18 at 02:58 +, Noah Misch wrote: > > Don't enter parallel mode when holding interrupts. > > > > Doing so caused the leader to hang in wait_event=ParallelFinish, which > > required an immediate shutdown to resolve. Back-patc

Re: Track the amount of time waiting due to cost_delay

2024-09-19 Thread Bertrand Drouvot
Hi, On Wed, Sep 18, 2024 at 04:04:53PM -0500, Nathan Bossart wrote: > On Thu, Sep 05, 2024 at 04:59:54AM +, Bertrand Drouvot wrote: > > Please find attached v6, a mandatory rebase due to catversion bump conflict. > > I'm removing the catversion bump from the patch as it generates too frequent

Improve statistics estimation considering GROUP-BY as a 'uniqueiser'

2024-09-19 Thread Andrei Lepikhov
Hi, One database app developer complied that He constantly has a problem with row estimations in joins over groupings and provided the demo example: CREATE TABLE line (id int PRIMARY KEY, docId int, amount numeric); CREATE INDEX line_doc ON line (docid); INSERT INTO line (id, docId, amount) (

Re: [PATCH] Add roman support for to_number function

2024-09-19 Thread Hunaid Sohail
Hi, I have attached a new patch with following changes: - Addressed minor issues identified by Tom. - Rejected other formats with RN and updated the docs. - Added a few more tests. Regards, Hunaid Sohail > v4-0001-Add-roman-support-for-to_number-function.patch Description: Binary data

Re: Partitioned tables and [un]loggedness

2024-09-19 Thread Alvaro Herrera
On 2024-Sep-10, Michael Paquier wrote: > @@ -5060,17 +5061,17 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd > *cmd, > pass = AT_PASS_MISC; > break; > case AT_AttachPartition: > - ATSimplePermissions(cmd->subty

Re: Memory consumed by paths during partitionwise join planning

2024-09-19 Thread Andrei Lepikhov
On 6/2/2024 13:51, Ashutosh Bapat wrote: On Fri, Dec 15, 2023 at 5:22 AM Ashutosh Bapat wrote: That looks pretty small considering the benefits. What do you think? [1] https://www.postgresql.org/message-id/caexhw5stmouobe55pmt83r8uxvfcph+pvo5dnpdrvcsbgxe...@mail.gmail.com If you want to e

Re: Restrict EXPLAIN (ANALYZE) for RLS and security_barrier views

2024-09-19 Thread Laurenz Albe
On Mon, 2024-05-06 at 16:46 +0200, Laurenz Albe wrote: > Currently, it is pretty easy to subvert the restrictions imposed > by row-level security and security_barrier views.  All you have to > to is use EXPLAIN (ANALYZE) and see how many rows were filtered > out by the RLS policy or the view condit

Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.

2024-09-19 Thread Anton A. Melnikov
On 18.09.2024 21:04, Fujii Masao wrote: -    CreateCheckPoint(flags); -    ckpt_performed = true; +    ckpt_performed = CreateCheckPoint(flags); This change could result in the next scheduled checkpoint being triggered in 15 seconds if a checkpoint is skippe

Increase of maintenance_work_mem limit in 64-bit Windows

2024-09-19 Thread Пополитов Владлен
Hello! Currently PostgreSQL built on 64-bit Windows has 2Gb limit for GUC variables due to sizeof(long)==4 used by Windows compilers. Technically 64-bit addressing for maintenance_work_mem is possible, but code base historically uses variables and constants of type "long", when process maintenanc

Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bind

2024-09-19 Thread Michael Paquier
On Wed, Sep 18, 2024 at 06:08:54PM +0900, Michael Paquier wrote: > On Wed, Sep 18, 2024 at 09:42:43AM +0200, Anthonin Bonnefoy wrote: >> I've joined a patch to clean the psql extended state at the start of >> every extended protocol backslash command, freeing the allocated >> variables and resettin

Re: not null constraints, again

2024-09-19 Thread Alvaro Herrera
On 2024-Sep-19, jian he wrote: > still based on v3. > in src/sgml/html/ddl-partitioning.html > << Both CHECK and NOT NULL constraints of a partitioned table are always > inherited by all its partitions. > CHECK constraints that are marked NO INHERIT are not allowed to be > created on partitioned t

Re: not null constraints, again

2024-09-19 Thread jian he
On Thu, Sep 19, 2024 at 4:26 PM Alvaro Herrera wrote: > > > > drop table if exists idxpart, idxpart0, idxpart1 cascade; > > create table idxpart (a int) partition by range (a); > > create table idxpart0 (a int primary key); > > alter table idxpart attach partition idxpart0 for values from (0) to (

Re: Pgoutput not capturing the generated columns

2024-09-19 Thread Amit Kapila
On Tue, Sep 17, 2024 at 12:04 PM Peter Smith wrote: > > On Tue, Sep 17, 2024 at 4:15 PM Masahiko Sawada wrote: > > > > On Mon, Sep 16, 2024 at 8:09 PM Peter Smith wrote: > > > > > > I thought that the option "publish_generated_columns" is more related > > > to "column lists" than "row filters".

Re: Memory consumed by paths during partitionwise join planning

2024-09-19 Thread Ashutosh Bapat
On Thu, Sep 19, 2024 at 4:18 PM Andrei Lepikhov wrote: > > On 6/2/2024 13:51, Ashutosh Bapat wrote: > > On Fri, Dec 15, 2023 at 5:22 AM Ashutosh Bapat > > wrote: > > > >>> > >>> That looks pretty small considering the benefits. What do you think? > >>> > >>> [1] > >>> https://www.postgresql.org/

Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN

2024-09-19 Thread Tatsuo Ishii
> 1. It's probably a minor detail, but in show_recursive_union_info(), I > don't think the tuplestores can ever be NULL. > > + if (working_table != NULL) > + tuplestore_get_stats(working_table, &tempStorageType, &tempSpaceUsed); > + > + if (intermediate_table != NULL) > + tuplestore_get_stats(inte

Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bind

2024-09-19 Thread Jelte Fennema-Nio
On Thu, 19 Sept 2024 at 09:30, Michael Paquier wrote: > Issuing an error if there is a state does not sound like a good idea > at this stage because it would suddenly break scripts that expect > multiple commands of \bind to prioritize the last one. Seems like a good idea to add a simple test for

Re: Should rolpassword be toastable?

2024-09-19 Thread Tom Lane
Nathan Bossart writes: > Hm. It does seem like there's little point in giving pg_authid a TOAST > table, as rolpassword is the only varlena column, and it obviously has > problems. But wouldn't removing it just trade one unhelpful internal error > when trying to log in for another when trying to

Re: macOS Ventura won't generate core dumps

2024-09-19 Thread Robert Haas
On Tue, Apr 9, 2024 at 4:34 PM Tom Lane wrote: > Huh, that's odd. One idea that comes to mind is that the core files > are frickin' large, for me typically around 3.5GB-4GB even for a > postmaster running with default shared memory sizes. (I don't know > why, although it seems to me they were le

Re: First draft of PG 17 release notes

2024-09-19 Thread Robert Haas
On Wed, Sep 18, 2024 at 9:09 PM Nathan Bossart wrote: > On Wed, Sep 18, 2024 at 05:33:18PM -0400, Bruce Momjian wrote: > > On Tue, Sep 17, 2024 at 10:01:28AM +0200, Jelte Fennema-Nio wrote: > >> Another new API that is useful for extension authors is the following > >> one (I'm obviously biased si

Re: Using per-transaction memory contexts for storing decoded tuples

2024-09-19 Thread Masahiko Sawada
Hi, On Mon, Sep 16, 2024 at 10:56 PM Hayato Kuroda (Fujitsu) wrote: > > Hi, > > > We have several reports that logical decoding uses memory much more > > than logical_decoding_work_mem[1][2][3]. For instance in one of the > > reports[1], even though users set logical_decoding_work_mem to > > '256

Re: Using per-transaction memory contexts for storing decoded tuples

2024-09-19 Thread Masahiko Sawada
On Wed, Sep 18, 2024 at 8:55 PM Amit Kapila wrote: > > On Thu, Sep 19, 2024 at 6:46 AM David Rowley wrote: > > > > On Thu, 19 Sept 2024 at 11:54, Masahiko Sawada > > wrote: > > > I've done some benchmark tests for three different code bases with > > > different test cases. In short, reducing th

Re: First draft of PG 17 release notes

2024-09-19 Thread Bruce Momjian
On Thu, Sep 19, 2024 at 12:23:21PM -0400, Robert Haas wrote: > On Wed, Sep 18, 2024 at 9:09 PM Nathan Bossart > wrote: > > On Wed, Sep 18, 2024 at 05:33:18PM -0400, Bruce Momjian wrote: > > > On Tue, Sep 17, 2024 at 10:01:28AM +0200, Jelte Fennema-Nio wrote: > > >> Another new API that is useful

Re: First draft of PG 17 release notes

2024-09-19 Thread Robert Haas
On Thu, Sep 19, 2024 at 1:04 PM Bruce Momjian wrote: > I mentioned the SPI macros because that could lead to breakage, and > there might be applications, as well as extensions, that use it. Sure, this is all a judgement call. I don't think it's particularly likely that many people are relying on

Re: Pgoutput not capturing the generated columns

2024-09-19 Thread Masahiko Sawada
On Thu, Sep 19, 2024 at 2:32 AM Amit Kapila wrote: > > On Tue, Sep 17, 2024 at 12:04 PM Peter Smith wrote: > > > > On Tue, Sep 17, 2024 at 4:15 PM Masahiko Sawada > > wrote: > > > > > > On Mon, Sep 16, 2024 at 8:09 PM Peter Smith wrote: > > > > > > > > I thought that the option "publish_genera

Re: Should rolpassword be toastable?

2024-09-19 Thread Nathan Bossart
On Thu, Sep 19, 2024 at 10:31:15AM -0400, Tom Lane wrote: > Nathan Bossart writes: >> Hm. It does seem like there's little point in giving pg_authid a TOAST >> table, as rolpassword is the only varlena column, and it obviously has >> problems. But wouldn't removing it just trade one unhelpful in

Re: Add on_error and log_verbosity options to file_fdw

2024-09-19 Thread torikoshia
On 2024-09-11 23:50, Fujii Masao wrote: Thanks for your comments! Here are the review comments for 0001 patch. + silent excludes verbose messages. This should clarify that in silent mode, not only verbose messages but also default ones are suppressed? Agreed. + cstate-

Re: Conflict Detection and Resolution

2024-09-19 Thread Michail Nikolaev
Hello! Sorry for being noisy, just for the case, want to notice that [1] needs to be addressed before any real usage of conflict resolution. [1]: https://www.postgresql.org/message-id/flat/OS0PR01MB5716E30952F542E256DD72E294802%40OS0PR01MB5716.jpnprd01.prod.outlook.com#8aa2083efa76e6a65f51b8a7fd5

Re: Should rolpassword be toastable?

2024-09-19 Thread Nathan Bossart
On Thu, Sep 19, 2024 at 06:00:00AM +0300, Alexander Lakhin wrote: > 23.09.2023 21:00, Alexander Lakhin wrote: >> So for now only pg_authid is worthy of condemnation, AFAICS. > > Let me remind you of this issue in light of b52c4fc3c. > Yes, it's opposite, but maybe it makes sense to fix it now in t

Re: DROP OWNED BY fails to clean out pg_init_privs grants

2024-09-19 Thread Marina Polyakova
Hello! IIUC the regression test test_pg_dump [1] fails, see the attached regression.diffs: diff -U3 /Users/test/Work/postgrespro/src/test/modules/test_pg_dump/expected/test_pg_dump.out /Users/test/Work/postgrespro/build/testrun/test_pg_dump-running/regress/results/test_pg_dump.out --- /User

Re: Pgoutput not capturing the generated columns

2024-09-19 Thread Amit Kapila
On Thu, Aug 29, 2024 at 8:44 AM Masahiko Sawada wrote: > > On Wed, Aug 28, 2024 at 1:06 AM Amit Kapila wrote: > > > > > > > > As Euler mentioned earlier, I think it's a decision not to replicate > > > generated columns because we don't know the target table on the > > > subscriber has the same ex

Re: [HACKERS] Allow INSTEAD OF DELETE triggers to modify the tuple for RETURNING

2024-09-19 Thread Rahila Syed
Hi, > So I'm suggesting to change this behavior and allow INSTEAD OF DELETE > triggers to modify the OLD tuple and use that for RETURNING instead of > returning the tuple in planSlot. Attached is a WIP patch implementing that. > I am trying to understand the basic idea behind the change. What is

Re: Incremental Sort Cost Estimation Instability

2024-09-19 Thread Andrei Lepikhov
On 12/9/2024 12:12, David Rowley wrote: On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote: Initial problem causes wrong cost_sort estimation. Right now I think about providing cost_sort() the sort clauses instead of (or in addition to) the pathkeys. I'm not quite sure why the sort clauses

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-09-19 Thread Alexander Lakhin
Hello Nathan, 18.09.2024 22:52, Nathan Bossart wrote: Committed. I waffled on whether to add a test for system indexes that used pg_index's varlena columns, but I ended up leaving it out. I've attached it here in case anyone thinks we should add it. I've discovered that Jonathan's initial sc

Re: Wrong results with equality search using trigram index and non-deterministic collation

2024-09-19 Thread Laurenz Albe
On Tue, 2024-09-17 at 08:00 +0200, Laurenz Albe wrote: > Using a trigram index with an non-deterministic collation can > lead to wrong query results: > [...] > > I don't know what the correct fix would be. Perhaps just refusing to use > the index for equality comparisons with non-deterministic co

Re: [PATCH] WIP: replace method for jsonpath

2024-09-19 Thread Florents Tselai
On 18 Sep 2024, at 3:47 PM, Andrew Dunstan wrote: On 2024-09-18 We 4:23 AM, Peter Eisentraut wrote: On 17.09.24 21:16, David E. Wheeler wrote: On Sep 17, 2024, at 15:03, Florents Tselai wrote: Fallback scenario: make this an extension, but in a first pass I didn’t find any convenient hooks.

Re: Custom connstr in background_psql()

2024-09-19 Thread a . imamov
Michael Paquier писал(а) 2024-09-18 01:57: On Wed, Sep 18, 2024 at 01:08:26AM +0300, a.ima...@postgrespro.ru wrote: I've noticed that there is no way to specify a custom connection string when calling the PostgreSQL::Test::Cluster->background_psql() method compared to the PostgreSQL::Test:Clust

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-09-19 Thread Nathan Bossart
On Thu, Sep 19, 2024 at 12:00:00PM +0300, Alexander Lakhin wrote: > I've discovered that Jonathan's initial script: > CREATE TABLE def (id int); > SELECT array_agg(n) b FROM generate_series(1,10_000) n \gset > CREATE OR REPLACE FUNCTION vec_quantizer (a int, b int[]) RETURNS bool > AS $$ SELECT tru

Re: Conflict detection for update_deleted in logical replication

2024-09-19 Thread Masahiko Sawada
On Tue, Sep 17, 2024 at 9:29 PM Amit Kapila wrote: > > On Tue, Sep 17, 2024 at 11:24 PM Masahiko Sawada > wrote: > > > > On Mon, Sep 16, 2024 at 11:53 PM Amit Kapila > > wrote: > > > > > > On Tue, Sep 17, 2024 at 6:08 AM Masahiko Sawada > > > wrote: > > > > > > I haven't thought about the im