Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-03-27 Thread Masahiko Sawada
On Wed, Mar 27, 2024 at 5:43 PM Masahiko Sawada wrote: > > On Wed, Mar 27, 2024 at 9:25 AM John Naylor wrote: > > > > On Mon, Mar 25, 2024 at 8:07 PM Masahiko Sawada > > wrote: > > > > > > On Mon, Mar 25, 2024 at 3:25 PM John Naylor > > > wrote: > > > > > > > > On Fri, Mar 22, 2024 at 12:20 

Re: BUG: deadlock between autovacuum worker and client backend during removal of orphan temp tables with sequences

2024-03-27 Thread Akshat Jaimini
Hii, I am currently trying to review the submitted patch but I am not able to apply it to the master branch. Regards, Akshat Jaimini

Re: Change GUC hashtable to use simplehash?

2024-03-27 Thread Jeff Davis
On Wed, 2024-03-27 at 13:44 +0700, John Naylor wrote: > Thanks for the pointers! In v20-0001, I've drafted checking thes > spelling first, since pg_attribute_no_sanitize_alignment has a > similar > version check. Then it checks for no_sanitize_address using > __has_attribute, which goes back to

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-03-27 Thread Thomas Munro
With the unexplained but apparently somewhat systematic regression patterns on certain tests and settings, I wonder if they might be due to read_stream.c trying to form larger reads, making it a bit lazier. It tries to see what the next block will be before issuing the fadvise. I think that means

Re: Can't find not null constraint, but \d+ shows that

2024-03-27 Thread jian he
On Wed, Mar 27, 2024 at 10:26 PM Tender Wang wrote: > > Alvaro Herrera 于2024年3月26日周二 23:25写道: >> >> On 2024-Mar-26, Tender Wang wrote: >> >> > postgres=# CREATE TABLE t1(c0 int, c1 int); >> > postgres=# ALTER TABLE t1 ADD CONSTRAINT Q PRIMARY KEY(c0, c1); >> > postgres=# ALTER TABLE t1 DROP

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

2024-03-27 Thread Thomas Munro
New version with some cosmetic/comment changes, and Melanie's read_stream_reset() function merged, as required by her sequential scan user patch. I tweaked it slightly: it might as well share code with read_stream_end(). I think setting distance = 1 is fine for now, and we might later want to

Re: Proposal: Introduce row-level security templates

2024-03-27 Thread Aadhav Vignesh
Hi Stojan, > I do think there should be the option to attach it immediately to > tables, something like `CREATE POLICY TEMPLATE ATTACH TO > AS ...` but it’s not a deal-breaker for me. I would say that because templates are not active until they’re > attached, the logic for “validating” the

RE: Synchronizing slots from primary to standby

2024-03-27 Thread Zhijie Hou (Fujitsu)
Hi, When analyzing one BF error[1], we find an issue of slotsync: Since we don't perform logical decoding for the synced slots when syncing the lsn/xmin of slot, no logical snapshots will be serialized to disk. So, when user starts to use these synced slots after promotion, it needs to re-build

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-27 Thread shveta malik
On Wed, Mar 27, 2024 at 9:00 PM Bharath Rupireddy wrote: > > Thanks. I'm attaching v29 patches. 0001 managing inactive_since on the > standby for sync slots. 0002 implementing inactive timeout GUC based > invalidation mechanism. > > Please have a look. Thanks for the patches. v29-001 looks good

Re: DOCS: add helpful partitioning links

2024-03-27 Thread Ashutosh Bapat
LGTM. The commitfest entry is marked as RFC already. Thanks for taking care of the comments. -- Best Wishes, Ashutosh Bapat On Thu, Mar 28, 2024 at 5:54 AM Robert Treat wrote: > On Mon, Mar 25, 2024 at 6:43 AM Ashutosh Bapat > wrote: > > On Fri, Mar 22, 2024 at 10:58 PM Robert Treat

Re: Fix parallel vacuum buffer usage reporting

2024-03-27 Thread Masahiko Sawada
Hi, Thank you for the report. On Fri, Feb 9, 2024 at 6:10 PM Anthonin Bonnefoy wrote: > > Hi, > > With a db setup with pgbench, we add an additional index: > CREATE INDEX ON pgbench_accounts(abalance) > > And trigger several updates and vacuum to reach a stable amount of > dirtied pages: >

Re: Properly pathify the union planner

2024-03-27 Thread David Rowley
On Thu, 28 Mar 2024 at 15:56, Tom Lane wrote: > I haven't studied the underlying problem yet, so I'm not quite > buying into whether we need this struct at all ... The problem is, when planning a UNION child query, we want to try and produce some Paths that would suit the top-level UNION query

Re: Add pg_basetype() function to obtain a DOMAIN base type

2024-03-27 Thread Tom Lane
jian he writes: > I noticed psql \dD didn't return the basetype of a domain. > one of the usage of this feature would be in psql \dD. Your 0002 will cause \dD to fail entirely against an older server. I'm not necessarily against adding this info, but you can't just ignore the expectations for

Re: Properly pathify the union planner

2024-03-27 Thread Tom Lane
Richard Guo writes: > On Wed, Mar 27, 2024 at 6:34 PM David Rowley wrote: >> The attached is roughly what I had in mind. I've not taken the time >> to see what comments need to be updated, so the attached aims only to >> assist discussion. > I like this idea. I haven't studied the underlying

Re: Add pg_basetype() function to obtain a DOMAIN base type

2024-03-27 Thread jian he
On Thu, Mar 21, 2024 at 10:34 AM jian he wrote: > > On Mon, Mar 18, 2024 at 11:43 PM Tom Lane wrote: > > > > Alexander Korotkov writes: > > > On Mon, Mar 18, 2024 at 2:01 AM jian he > > > wrote: > > >> ` > > >> Datum > > >> pg_basetype(PG_FUNCTION_ARGS) > > >> { > > >> Oid oid; > > >> >

Re: Properly pathify the union planner

2024-03-27 Thread Richard Guo
On Wed, Mar 27, 2024 at 6:34 PM David Rowley wrote: > On Wed, 27 Mar 2024 at 22:47, David Rowley wrote: > > I did wonder when first working on this patch if subquery_planner() > > should grow an extra parameter, or maybe consolidate some existing > > ones by passing some struct that provides

Re: Remove some redundant set_cheapest() calls

2024-03-27 Thread Richard Guo
On Wed, Mar 27, 2024 at 10:59 PM Tom Lane wrote: > Richard Guo writes: > > On Wed, Mar 27, 2024 at 4:06 AM Tom Lane wrote: > >> I'm less convinced about changing this. I'd rather keep it consistent > >> with mark_dummy_rel. > > > Hm, I wonder if we should revise the comment there that states

Re: Fix some resources leaks (src/bin/pg_basebackup/pg_createsubscriber.c)

2024-03-27 Thread Euler Taveira
On Wed, Mar 27, 2024, at 8:50 PM, Ranier Vilela wrote: > Coverity has some reports in the new code > pg_createsubscriber.c > I think that Coverity is right. It depends on your "right" definition. If your program execution is ephemeral and the leak is just before exiting, do you think it's worth

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-27 Thread Melanie Plageman
On Thu, Mar 28, 2024 at 01:04:04AM +0200, Heikki Linnakangas wrote: > On 27/03/2024 20:26, Melanie Plageman wrote: > > On Wed, Mar 27, 2024 at 12:18 PM Heikki Linnakangas wrote: > > > > > > On 27/03/2024 17:18, Melanie Plageman wrote: > > > > I need some way to modify the control flow or

Re: add AVX2 support to simd.h

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 04:37:35PM -0500, Nathan Bossart wrote: > On Wed, Mar 27, 2024 at 05:10:13PM -0400, Tom Lane wrote: >> LGTM otherwise, and I like the fact that the #if structure >> gets a lot less messy. > > Thanks for reviewing. I've attached a v2 that I intend to commit when I > get a

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2024-03-27 Thread Masahiko Sawada
Hi, On Thu, Jan 18, 2024 at 5:33 PM Masahiko Sawada wrote: > > On Thu, Jan 18, 2024 at 4:59 PM Alexander Korotkov > wrote: > > > > On Thu, Jan 18, 2024 at 4:16 AM torikoshia > > wrote: > > > On 2024-01-18 10:10, jian he wrote: > > > > On Thu, Jan 18, 2024 at 8:57 AM Masahiko Sawada > > > >

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

2024-03-27 Thread Thomas Munro
On Thu, Mar 28, 2024 at 2:02 PM Thomas Munro wrote: > ... In practice on a non-toy system, that's always going to be > io_combine_limit. ... And to be more explicit about that: you're right that we initialise max_pinned_buffers such that it's usually at least io_combine_limit, but then if you

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

2024-03-27 Thread Thomas Munro
On Mon, Mar 25, 2024 at 2:02 AM Thomas Munro wrote: > On Wed, Mar 20, 2024 at 4:04 AM Heikki Linnakangas wrote: > > > /* > > >* Skip the initial ramp-up phase if the caller says we're going to > > > be > > >* reading the whole relation. This way we start out doing > > >

Re: Add new error_action COPY ON_ERROR "log"

2024-03-27 Thread Masahiko Sawada
On Thu, Mar 28, 2024 at 2:49 AM Bharath Rupireddy wrote: > > On Wed, Mar 27, 2024 at 7:42 AM Masahiko Sawada wrote: > > > > I think that there are two options to handle it: > > > > 1. change COPY grammar to accept DEFAULT as an option value. > > 2. change tab-completion to complement 'DEFAULT'

Re: Streaming read-ready sequential scan code

2024-03-27 Thread Melanie Plageman
On Fri, Mar 8, 2024 at 4:56 PM Melanie Plageman wrote: > > On Sat, Mar 02, 2024 at 06:07:48PM -0500, Melanie Plageman wrote: > > On Wed, Feb 28, 2024 at 12:30 PM Melanie Plageman > > wrote: > > > > > > On Mon, Feb 26, 2024 at 03:56:57PM -0500, Melanie Plageman wrote: > > > > On Mon, Feb 19, 2024

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 5:43 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > > This section is also the main entry point for users into the configuration > subsystem and hasn't been updated to reflect this new feature. That seems > like an oversight that needs to be corrected. > >

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 5:17 PM Bruce Momjian wrote: > On Thu, Mar 28, 2024 at 12:43:29AM +0100, Jelte Fennema-Nio wrote: > > + xreflabel="allow_alter_system"> > > + allow_alter_system (boolean) > > + > > + allow_alter_system configuration > parameter > > + > > +

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-27 Thread Alexander Korotkov
On Tue, Mar 26, 2024 at 4:06 PM Kartyshov Ivan wrote: > Thank you for your interest to the patch. > I understand you questions, but I fully support Alexander Korotkov idea > to commit the minimal required functionality. And then keep working on > other improvements. I did further improvements in

Re: DOCS: add helpful partitioning links

2024-03-27 Thread Robert Treat
On Mon, Mar 25, 2024 at 6:43 AM Ashutosh Bapat wrote: > On Fri, Mar 22, 2024 at 10:58 PM Robert Treat wrote: >> v5 patch attached which I think further improves clarity/brevity of >> this section. I've left the patch name the same for simplicity, but >> I'd agree that the commit would now be

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Bruce Momjian
On Thu, Mar 28, 2024 at 12:43:29AM +0100, Jelte Fennema-Nio wrote: > + xreflabel="allow_alter_system"> > + allow_alter_system (boolean) > + > + allow_alter_system configuration > parameter > + > + > + > + > +When allow_alter_system is set to

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Bruce Momjian
On Thu, Mar 28, 2024 at 12:47:46AM +0100, Jelte Fennema-Nio wrote: > On Wed, 27 Mar 2024 at 23:06, Bruce Momjian wrote: > > > > > > +some outside mechanism. In such environments, using > > > > > > ALTER > > > > > > +SYSTEM to make configuration changes might > > > > > > appear

Fix some resources leaks (src/bin/pg_basebackup/pg_createsubscriber.c)

2024-03-27 Thread Ranier Vilela
Hi, Per Coverity. Coverity has some reports in the new code pg_createsubscriber.c I think that Coverity is right. 1. CID 1542682: (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable buf going out of scope leaks the storage it points to. 2. CID 1542704: (#1 of 1): Resource leak

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Jelte Fennema-Nio
On Wed, 27 Mar 2024 at 23:06, Bruce Momjian wrote: > > > > > +some outside mechanism. In such environments, using > > > > > ALTER > > > > > +SYSTEM to make configuration changes might appear > > > > > to work, > > > > > +but then may be discarded at some point in the

Re: Crash on UNION with PG 17

2024-03-27 Thread David Rowley
On Thu, 28 Mar 2024 at 04:34, Regina Obe wrote: > The issue can be exercised without postgis installed as follows: > > > CREATE TABLE edge_data AS > SELECT i AS edge_id, i + 1 AS start_node, i + 2 As end_node > FROM generate_series(1,10) AS i; > > WITH edge AS ( > SELECT start_node,

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Jelte Fennema-Nio
On Wed, 27 Mar 2024 at 20:10, Maciek Sakrejda wrote: > > On Wed, Mar 27, 2024, 11:46 Robert Haas wrote: >> >> On Wed, Mar 27, 2024 at 1:12 PM Isaac Morland >> wrote: >> > On Wed, 27 Mar 2024 at 13:05, Greg Sabino Mullane >> > wrote: >> >>> The purpose of the setting is to prevent accidental

Re: Psql meta-command conninfo+

2024-03-27 Thread Imseih (AWS), Sami
Hi, Thanks for working on this. I have a few comments about the current patch. 1/ I looked through other psql-meta commands and the “+” adds details but does not change output format. In this patch, conninfo and conninfo+ have completely different output. The former is a string with all the

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Jelte Fennema-Nio
On Wed, 27 Mar 2024 at 23:23, Bruce Momjian wrote: > > On Wed, Mar 27, 2024 at 11:10:31AM -0400, Robert Haas wrote: > > > Is this really a patch we think we can push into PG 17. I am having my > > > doubts. > > > > If the worst thing that happens in PG 17 is that we push a patch that > > needs a

RE: Popcount optimization using AVX512

2024-03-27 Thread Amonson, Paul D
> -Original Message- > From: Nathan Bossart > Sent: Wednesday, March 27, 2024 3:00 PM > To: Amonson, Paul D > > ... (I realize that I'm essentially > recanting much of my previous feedback, which I apologize for.) It happens. LOL As long as the algorithm for AVX-512 is not altered I

Re: Crash on UNION with PG 17

2024-03-27 Thread Bruce Momjian
On Wed, Mar 27, 2024 at 11:33:55AM -0400, Regina Obe wrote: > Our PostGIS bot that follows master branch has been crashing for past couple > of days on one of our tests > > https://trac.osgeo.org/postgis/ticket/5701 > > I traced the issue down to this commit: >

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Bruce Momjian
On Wed, Mar 27, 2024 at 03:20:38PM -0700, David G. Johnston wrote: > On Wed, Mar 27, 2024 at 3:18 PM David G. Johnston > wrote: > > On Wed, Mar 27, 2024 at 3:13 PM Bruce Momjian wrote: > > On Wed, Mar 27, 2024 at 06:09:02PM -0400, Bruce Momjian wrote: > > On Wed, Mar 27,

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Bruce Momjian
On Wed, Mar 27, 2024 at 11:10:31AM -0400, Robert Haas wrote: > > Is this really a patch we think we can push into PG 17. I am having my > > doubts. > > If the worst thing that happens in PG 17 is that we push a patch that > needs a few documentation corrections, we're going to be doing >

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 3:18 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Mar 27, 2024 at 3:13 PM Bruce Momjian wrote: > >> On Wed, Mar 27, 2024 at 06:09:02PM -0400, Bruce Momjian wrote: >> > On Wed, Mar 27, 2024 at 11:05:55AM -0400, Robert Haas wrote: >> > > On Wed, Mar

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 3:13 PM Bruce Momjian wrote: > On Wed, Mar 27, 2024 at 06:09:02PM -0400, Bruce Momjian wrote: > > On Wed, Mar 27, 2024 at 11:05:55AM -0400, Robert Haas wrote: > > > On Wed, Mar 27, 2024 at 10:43 AM Jelte Fennema-Nio > wrote: > > > > Alright, changed the GUC name to

Re: Built-in CTYPE provider

2024-03-27 Thread Jeff Davis
On Tue, 2024-03-26 at 08:04 +0100, Peter Eisentraut wrote: > The patch set v27 is ok with me, modulo (a) discussion about initcap > semantics, and (b) what collation to assign to ucs_basic, which can > be > revisited later. I held off on the refactoring patch for lc_{ctype|collate}_is_c().

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Bruce Momjian
On Wed, Mar 27, 2024 at 06:09:02PM -0400, Bruce Momjian wrote: > On Wed, Mar 27, 2024 at 11:05:55AM -0400, Robert Haas wrote: > > On Wed, Mar 27, 2024 at 10:43 AM Jelte Fennema-Nio > > wrote: > > > Alright, changed the GUC name to "allow_alter_system" since that seems > > > to have the most

Re: Large block sizes support in Linux

2024-03-27 Thread Stephen Frost
Greetings, * Pankaj Raghav (ker...@pankajraghav.com) wrote: > On 23/03/2024 05:53, Thomas Munro wrote: > > On Fri, Mar 22, 2024 at 10:56 PM Pankaj Raghav (Samsung) > > wrote: > >> My team and I have been working on adding Large block size(LBS) > >> support to XFS in Linux[1]. Once this feature

Re: incorrect results and different plan with 2 very similar queries

2024-03-27 Thread Dave Cramer
Dave Cramer On Wed, 27 Mar 2024 at 17:57, David Rowley wrote: > On Thu, 28 Mar 2024 at 10:33, Dave Cramer wrote: > > There is a report on the pgjdbc github JDBC Driver shows erratic > behavior when filtering on CURRENT_DATE · pgjdbc/pgjdbc · Discussion #3184 ( > github.com) > > > > Here are

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Bruce Momjian
On Wed, Mar 27, 2024 at 11:05:55AM -0400, Robert Haas wrote: > On Wed, Mar 27, 2024 at 10:43 AM Jelte Fennema-Nio wrote: > > Alright, changed the GUC name to "allow_alter_system" since that seems > > to have the most "votes". One other option would be to call it simply > > "alter_system", just

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

2024-03-27 Thread Thomas Munro
On Thu, Mar 28, 2024 at 10:52 AM Thomas Munro wrote: > I think 1 is good, as a rescan is even more likely to find the pages > in cache, and if that turns out to be wrong it'll very soon adjust. Hmm, no I take that back, it probably won't be due to the strategy/ring... I see your point now...

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Bruce Momjian
On Wed, Mar 27, 2024 at 04:50:27PM +0100, Jelte Fennema-Nio wrote: > > This wording was suggested upthread. I think the point here is that if > > the superuser is logging in from the local machine, it's obvious that > > they can do whatever they want. The point is to emphasize that a > > superuser

Re: Popcount optimization using AVX512

2024-03-27 Thread Nathan Bossart
On Mon, Mar 25, 2024 at 03:05:51PM -0500, Nathan Bossart wrote: > On Mon, Mar 25, 2024 at 06:42:36PM +, Amonson, Paul D wrote: >> Ok, CI turned green after my re-post of the patches. Can this please get >> merged? > > Thanks for the new patches. I intend to take another look soon. Thanks

Re: incorrect results and different plan with 2 very similar queries

2024-03-27 Thread David Rowley
On Thu, 28 Mar 2024 at 10:33, Dave Cramer wrote: > There is a report on the pgjdbc github JDBC Driver shows erratic behavior > when filtering on CURRENT_DATE · pgjdbc/pgjdbc · Discussion #3184 (github.com) > > Here are the plans. > > JDBC - Nested Loop (incorrect result) > >

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

2024-03-27 Thread Thomas Munro
On Thu, Mar 28, 2024 at 9:43 AM Melanie Plageman wrote: > For sequential scan, I added a little reset function to the streaming > read API (read_stream_reset()) that just releases all the buffers. > Previously, it set finished to true before releasing the buffers (to > indicate it was done) and

Re: add AVX2 support to simd.h

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 05:10:13PM -0400, Tom Lane wrote: > Shouldn't "i" be declared uint32, since nelem is? Yes, that's a mistake. > BTW, I wonder why these functions don't declare their array > arguments like "const uint32 *base". They probably should. I don't see any reason not to, and my

incorrect results and different plan with 2 very similar queries

2024-03-27 Thread Dave Cramer
Greetings, There is a report on the pgjdbc github JDBC Driver shows erratic behavior when filtering on CURRENT_DATE · pgjdbc/pgjdbc · Discussion #3184 (github.com) Here are the plans. JDBC - Nested Loop (incorrect result) Sort

Re: [PATCH] plpython function causes server panic

2024-03-27 Thread Tom Lane
Robert Haas writes: > On Mon, Mar 25, 2024 at 11:36 AM Tom Lane wrote: >> ... I don't see why this case is different, >> especially when the added cost compared to HEAD is not much more than >> one C function call. > Well, I explained why *I* thought it was different, but obviously you > don't

Re: add AVX2 support to simd.h

2024-03-27 Thread Tom Lane
Nathan Bossart writes: > Here's what I had in mind. My usual benchmark seems to indicate that this > shouldn't impact performance. Shouldn't "i" be declared uint32, since nelem is? BTW, I wonder why these functions don't declare their array arguments like "const uint32 *base". LGTM otherwise,

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

2024-03-27 Thread Melanie Plageman
On Wed, Mar 27, 2024 at 10:11 AM Thomas Munro wrote: > > I got rid of "finished" (now represented by distance == 0, I was > removing branches and variables). I got rid of "started", which can > now be deduced (used for suppressing advice when you're calling > _next() because you need a block and

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2024-03-27 Thread Dmitry Koval
Hi! > I've fixed that by skipping a copy of the identity of another > partition (remove CREATE_TABLE_LIKE_IDENTITY from > TableLikeClause.options). Thanks for correction! Probably I should have looked at the code more closely after commit [1]. I'm also very glad that situation [2] was

Re: Use streaming read API in ANALYZE

2024-03-27 Thread Melanie Plageman
On Tue, Mar 26, 2024 at 02:51:27PM +0300, Nazir Bilal Yavuz wrote: > Hi, > > On Wed, 28 Feb 2024 at 14:42, Nazir Bilal Yavuz wrote: > > > > > > The new version of the streaming read API [1] is posted. I updated the > > streaming read API changes patch (0001), using the streaming read API > > in

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-27 Thread Ranier Vilela
Em qua., 27 de mar. de 2024 às 14:35, Nathan Bossart < nathandboss...@gmail.com> escreveu: > On Wed, Mar 27, 2024 at 01:47:38PM -0300, Ranier Vilela wrote: > > Em qua., 27 de mar. de 2024 às 13:41, Nathan Bossart < > > nathandboss...@gmail.com> escreveu: > >> On Wed, Mar 27, 2024 at 01:21:23PM

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Maciek Sakrejda
On Wed, Mar 27, 2024, 11:46 Robert Haas wrote: > On Wed, Mar 27, 2024 at 1:12 PM Isaac Morland > wrote: > > On Wed, 27 Mar 2024 at 13:05, Greg Sabino Mullane > wrote: > >>> The purpose of the setting is to prevent > accidental modifications via ALTER > SYSTEM in environments where > >> The

Re: add AVX2 support to simd.h

2024-03-27 Thread Nathan Bossart
On Tue, Mar 26, 2024 at 09:48:57PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> I just did the minimal fix for now, i.e., I moved the new label into the >> SIMD section of the function. I think it would be better stylistically to >> move the one-by-one logic to an inline helper function,

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-03-27 Thread Alvaro Herrera
On 2024-Mar-27, Alvaro Herrera wrote: > I changed it so that the error messages are returned as translated > phrases, and was bothered by the fact that if errors happen repeatedly, > the memory for them might be leaked. Maybe this is fine depending on > the caller's memory context, but since

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Robert Haas
On Wed, Mar 27, 2024 at 1:12 PM Isaac Morland wrote: > On Wed, 27 Mar 2024 at 13:05, Greg Sabino Mullane wrote: >>> The purpose of the setting is to prevent accidental >>> modifications via ALTER SYSTEM in environments where >> The emphasis on 'accidental' seems a bit heavy here, and odd.

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-27 Thread Melanie Plageman
On Wed, Mar 27, 2024 at 2:26 PM Melanie Plageman wrote: > > On Wed, Mar 27, 2024 at 12:18 PM Heikki Linnakangas wrote: > > > > On 27/03/2024 17:18, Melanie Plageman wrote: > > > I need some way to modify the control flow or accounting such that I > > > know which HEAPTUPLE_RECENTLY_DEAD tuples

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-03-27 Thread Alvaro Herrera
On 2024-Mar-22, Jelte Fennema-Nio wrote: > On Thu, 21 Mar 2024 at 03:54, Noah Misch wrote: > > > > On Mon, Mar 18, 2024 at 07:40:10PM +0100, Alvaro Herrera wrote: > > > I enabled the test again and also pushed the changes to dblink, > > > isolationtester and fe_utils (which AFAICS is used by

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-27 Thread Melanie Plageman
On Wed, Mar 27, 2024 at 12:18 PM Heikki Linnakangas wrote: > > On 27/03/2024 17:18, Melanie Plageman wrote: > > I need some way to modify the control flow or accounting such that I > > know which HEAPTUPLE_RECENTLY_DEAD tuples will not be marked LP_DEAD. > > And a way to consider freezing and do

Re: Add new error_action COPY ON_ERROR "log"

2024-03-27 Thread Bharath Rupireddy
On Wed, Mar 27, 2024 at 7:42 AM Masahiko Sawada wrote: > > I think that there are two options to handle it: > > 1. change COPY grammar to accept DEFAULT as an option value. > 2. change tab-completion to complement 'DEFAULT' instead of DEFAULT, > and update the doc too. > > As for the

Re: Built-in CTYPE provider

2024-03-27 Thread Jeff Davis
On Wed, 2024-03-27 at 16:53 +0100, Daniel Verite wrote: >  provider | isalpha | isdigit > --+-+- >  ICU  | f   | t >  glibc    | t   | f >  builtin  | f   | f The "ICU" above is really the behvior of the Postgres ICU provider as we implemented it, it's not

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread David G. Johnston
On Wed, Mar 27, 2024 at 10:12 AM Isaac Morland wrote: > On Wed, 27 Mar 2024 at 13:05, Greg Sabino Mullane > wrote: > >> The purpose of the setting is to prevent accidental >>> modifications via ALTER SYSTEM in environments where >> >> >> The emphasis on 'accidental' seems a bit heavy here, and

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 01:47:38PM -0300, Ranier Vilela wrote: > Em qua., 27 de mar. de 2024 às 13:41, Nathan Bossart < > nathandboss...@gmail.com> escreveu: >> On Wed, Mar 27, 2024 at 01:21:23PM -0300, Ranier Vilela wrote: >> > I think that left an oversight in a commit d365ae7 >> > < >>

Re: Adding application_name to the error and notice message fields

2024-03-27 Thread Mitar
Hi! Oh, I can use PQparameterStatus to obtain application_name of the current connection. It seems then it is not needed to add this information into notice message. Mitar On Wed, Mar 27, 2024 at 4:22 PM Mitar wrote: > > Hi! > > We take care to always set application_name to improve our log

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-27 Thread Peter Geoghegan
On Tue, Mar 19, 2024 at 9:36 PM Melanie Plageman wrote: > * "Freeze" NewRelfrozenXid/NewRelminMxid trackers. > * > * Trackers used when heap_freeze_execute_prepared freezes, or when > there > * are zero freeze plans for a page. It is always valid for >

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Isaac Morland
On Wed, 27 Mar 2024 at 13:05, Greg Sabino Mullane wrote: > The purpose of the setting is to prevent accidental >> modifications via ALTER SYSTEM in environments where > > > The emphasis on 'accidental' seems a bit heavy here, and odd. Surely, just > "to prevent modifications via ALTER SYSTEM in

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Greg Sabino Mullane
> > The purpose of the setting is to prevent accidental > modifications via ALTER SYSTEM in environments where The emphasis on 'accidental' seems a bit heavy here, and odd. Surely, just "to prevent modifications via ALTER SYSTEM in environments where..." is enough? Cheers, Greg

Re: Query Regarding frame options initialization in Window aggregate state

2024-03-27 Thread Tom Lane
Vallimaharajan G writes: > I am currently referring to the Postgres source code (psql (PostgreSQL) 14.3) > and came across a particular section related to window aggregate > initialization that has left me with a question. Specifically, I noticed a > conditional case in the initialization of

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-27 Thread Ranier Vilela
Em qua., 27 de mar. de 2024 às 13:41, Nathan Bossart < nathandboss...@gmail.com> escreveu: > On Wed, Mar 27, 2024 at 01:21:23PM -0300, Ranier Vilela wrote: > > Nathan Bossart writes: > >>Committed with that change. Thanks for the guidance on this one. > > > > I think that left an oversight in a

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 01:21:23PM -0300, Ranier Vilela wrote: > Nathan Bossart writes: >>Committed with that change. Thanks for the guidance on this one. > > I think that left an oversight in a commit d365ae7 >

Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

2024-03-27 Thread Ranier Vilela
Hi, Nathan Bossart writes: >Committed with that change. Thanks for the guidance on this one. I think that left an oversight in a commit d365ae7 If the admin_role is a NULL pointer, so, can be dereferenced in

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-27 Thread Heikki Linnakangas
On 27/03/2024 17:18, Melanie Plageman wrote: I need some way to modify the control flow or accounting such that I know which HEAPTUPLE_RECENTLY_DEAD tuples will not be marked LP_DEAD. And a way to consider freezing and do live tuple accounting for these and HEAPTUPLE_LIVE tuples exactly once.

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-27 Thread Bertrand Drouvot
Hi, On Wed, Mar 27, 2024 at 09:00:37PM +0530, Bharath Rupireddy wrote: > On Wed, Mar 27, 2024 at 6:54 PM Bertrand Drouvot > wrote: > > > > Hi, > > > > On Wed, Mar 27, 2024 at 05:55:05PM +0530, Bharath Rupireddy wrote: > > > On Wed, Mar 27, 2024 at 3:42 PM Bertrand Drouvot > > > Please see the

Re: pgsql: Clean up role created in new subscription test.

2024-03-27 Thread Daniel Gustafsson
> On 27 Mar 2024, at 16:26, Tom Lane wrote: > > Daniel Gustafsson writes: >> The only option is to make the check opt-in via a command-line parameter for >> use it in the main regress tests, and not use it for the contrib tests. The >> attached v7 does that and passes CI, but I wonder if it's

Re: Flushing large data immediately in pqcomm

2024-03-27 Thread Robert Haas
On Wed, Mar 27, 2024 at 7:39 AM David Rowley wrote: > Robert, I understand you'd like a bit more from this patch. I'm > wondering if you planning on blocking another committer from going > ahead with this? Or if you have a reason why the current state of the > patch is not a meaningful enough

Re: Built-in CTYPE provider

2024-03-27 Thread Daniel Verite
Jeff Davis wrote: > The tests include initcap('123abc') which is '123abc' in the PG_C_UTF8 > collation vs '123Abc' in PG_UNICODE_FAST. > > The reason for the latter behavior is that the Unicode Default Case > Conversion algorithm for toTitlecase() advances to the next Cased > character

Can't compile PG 17 (master) from git under Msys2 autoconf

2024-03-27 Thread Regina Obe
I've been having trouble compiling PG 17 using msys2 / mingw64 (sorry my meson setup is a bit broken at moment, so couldn't test that.). Both my msys2 envs (Rev2, Built by MSYS2 project) 13.2.0 and my older setup (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 Have the same issue:

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Jelte Fennema-Nio
On Wed, 27 Mar 2024 at 16:10, Robert Haas wrote: > > On Wed, Mar 27, 2024 at 11:01 AM Bruce Momjian wrote: > > Uh, the above is clearly wrong. I think you mean "off" on the second line. > > Woops. When the name changed from externally_managed_configuration to > allow_alter_system, the sense of

Crash on UNION with PG 17

2024-03-27 Thread Regina Obe
Our PostGIS bot that follows master branch has been crashing for past couple of days on one of our tests https://trac.osgeo.org/postgis/ticket/5701 I traced the issue down to this commit: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=66c0185a3d14b bbf51d0fc9d267093ffec735231

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-03-27 Thread Bharath Rupireddy
On Wed, Mar 27, 2024 at 6:54 PM Bertrand Drouvot wrote: > > Hi, > > On Wed, Mar 27, 2024 at 05:55:05PM +0530, Bharath Rupireddy wrote: > > On Wed, Mar 27, 2024 at 3:42 PM Bertrand Drouvot > > Please see the attached v28 patch. > > Thanks! > > 1 === sorry I missed it in the previous review > >

Re: Adding OLD/NEW support to RETURNING

2024-03-27 Thread Jeff Davis
On Wed, 2024-03-27 at 13:19 +, Dean Rasheed wrote: > What I'm most worried about now is that there are other areas of > functionality like that, that I'm overlooking, and which will > interact > with this feature in non-trivial ways. Agreed. I'm not sure exactly how we'd find those other

Re: pgsql: Allow using syncfs() in frontend utilities.

2024-03-27 Thread Robert Haas
On Wed, Mar 27, 2024 at 11:25 AM Nathan Bossart wrote: > Committed. Again, I apologize this took so long. No worries from my side; I only noticed recently. I guess Peter's been waiting a while, though. Thanks for committing. -- Robert Haas EDB: http://www.enterprisedb.com

Re: pgsql: Track last_inactive_time in pg_replication_slots.

2024-03-27 Thread Robert Haas
On Wed, Mar 27, 2024 at 11:06 AM Nathan Bossart wrote: > IMHO the use-case where this doesn't work so well is when you have many, > many servers to administer (e.g., a cloud provider). In those cases, > picking a default timeout to try to prevent wraparound is going to be much > less accurate,

Re: pgsql: Clean up role created in new subscription test.

2024-03-27 Thread Tom Lane
Daniel Gustafsson writes: > The only option is to make the check opt-in via a command-line parameter for > use it in the main regress tests, and not use it for the contrib tests. The > attached v7 does that and passes CI, but I wonder if it's worth it all with > that restriction? Yeah, that

Re: pgsql: Allow using syncfs() in frontend utilities.

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 10:41:42AM -0400, Robert Haas wrote: > On Tue, Mar 26, 2024 at 12:34 PM Nathan Bossart > wrote: >> Here's a first attempt at a patch based on Robert's suggestion from >> upthread. > > WFM. Committed. Again, I apologize this took so long. -- Nathan Bossart Amazon Web

Adding application_name to the error and notice message fields

2024-03-27 Thread Mitar
Hi! We take care to always set application_name to improve our log lines where we use %a in log_line_prefix to log application name, per [1]. But notices which are sent to the client do not have the application name and are thus hard to attribute correctly. Could "a" be added with the application

Re: Combine Prune and Freeze records emitted by vacuum

2024-03-27 Thread Melanie Plageman
On Tue, Mar 26, 2024 at 5:46 PM Melanie Plageman wrote: > > On Mon, Mar 25, 2024 at 09:33:38PM +0200, Heikki Linnakangas wrote: > > On 24/03/2024 18:32, Melanie Plageman wrote: > > > On Thu, Mar 21, 2024 at 9:28 AM Heikki Linnakangas > > > wrote: > > > > > > > > In heap_page_prune_and_freeze(),

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Robert Haas
On Wed, Mar 27, 2024 at 11:01 AM Bruce Momjian wrote: > Uh, the above is clearly wrong. I think you mean "off" on the second line. Woops. When the name changed from externally_managed_configuration to allow_alter_system, the sense of it was reversed, and I guess Jelte missed flipping the

Re: pg_upgrade failing for 200+ million Large Objects

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 10:54:05AM -0400, Tom Lane wrote: > Michael Banck writes: >> What is the status of this? In the commitfest, this patch is marked as >> "Needs Review" with Nathan as reviewer - Nathan, were you going to take >> another look at this or was your mail from January 12th a full

Re: Possibility to disable `ALTER SYSTEM`

2024-03-27 Thread Robert Haas
On Wed, Mar 27, 2024 at 10:43 AM Jelte Fennema-Nio wrote: > Alright, changed the GUC name to "allow_alter_system" since that seems > to have the most "votes". One other option would be to call it simply > "alter_system", just like "jit" is not called "allow_jit" or > "enable_jit". > > But

Re: pgsql: Track last_inactive_time in pg_replication_slots.

2024-03-27 Thread Nathan Bossart
On Wed, Mar 27, 2024 at 10:33:28AM -0400, Robert Haas wrote: > FWIW, I thought the time-based one sounded more useful. I think it > would be poor planning to say "well, if the slot reaches an XID age of > a billion, kill it so we don't wrap around," because while that likely > will prevent me from

  1   2   >